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:
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
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_location = maildir:/var/qmail/mailnames/%Ld/%Ln/Maildir
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.mail_location = maildir:/var/www/vhosts/%Ld/mail/%Ld/%LnMaildir
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