• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Mail Folder Accessible to Each User

MrRay

New Pleskian
I am a newbie to Plesk. While I am still more used to the cPanel interface, I'm starting to really like (and prefer) Plesk. But there are a few things I have yet to figure out, and hopefully your responses to this post will help me with one of those things.

I would like my Plesk users to each have access to the mail folder for their domain. cPanel appears to do this by default by creating a folder named /home/user/mail which contains a subfolder for each domain name. Plesk, however, places all email folders together in the /var/qmail/mailnames folder. I would like to end up with a structure similar to how cPanel does it, but it looks like there are at least a couple of ways to accomplish that and I'm not sure what would be the most safe, reliable way to do it.

One way I can think to do it would be to override the Plesk dovecot config by adding a new config file to /etc/dovecot/conf.d. I think changing the values for mail_home and mail_location as follows would possibly work. Old values:
mail_home = /var/qmail/mailnames/%Ld/%Ln
mail_location = maildir:/var/qmail/mailnames/%Ld/%Ln/Maildir​
New values:
mail_home = /var/www/vhosts/%Ld/mail/%Ld/%Ln
mail_location = maildir:/var/www/vhosts/%Ld/mail/%Ld/%LnMaildir​
I see a potential issue with this solution; the %Ld for an add-on domain will probably be the add-on domain, and there will not be a folder within /vhosts/ with that name. Perhaps there is another variable for the primary domain that I could use there.

A second way I can think to do it would be to add a symlink in /var/www/vhosts/domain/ named "mail" that points to the actual mail folder for a domain. Again, issues would probably occur here with add-on domains, and I also can't see a way to automate this. I also predict permissions issues with this solution.

Anyway, now you know what I'm hoping to do, and I hope some of you have a solution to recommend.

I am using Dovecot if that makes a difference.

Thanks
 
What is the main profit of replacing maildirs to user's vhost directory? Are you sure that security will not be affected? Why you want to do cPanel from Plesk?
 
Hi IgorG, thanks for your reply.

The objective is that the user has access to the emails for their own domain(s). I want them to handle backing them up, moving things when they need to be moved, etc. At the moment, if the need something done to their email folders, I have to do it.

I don't want to do cPanel from Plesk - I just want to give users access to their email via FTP/SSH similar to how cPanel does it.

Does this make sense?
 
But why you can't use backup of emails on domain level? You can download it, upload to ftp. I think it is much more suitable. Also "moving things when they need to be moved" can lead to unpredictable consequences.
 
Back
Top