dah85.com

*not* just another blog ;)

Setting up SSL for Mail in VestaCP

- Posted in Quick Tip by with comments

I'm still playing with my VestaCP install, and I've found that the outgoing mail doesn't work correctly when using Thunderbird or any other mail client except webmail which works perfectly.

It turns out there's an issue with the SSL certificates and EXIM (the mail server)

Here's what I did to fix it, just make sure you replace the example with your own domain. If you aren't running as root, use these commands otherwise put sudo in front of them all:

ln -s /home/admin/conf/web/ssl.example.com.pem /usr/local/vesta/ssl/certificate.crt
ln -s /home/admin/conf/web/ssl.example.com.key /usr/local/vesta/ssl/certificate.key

setfacl -m user:Debian-exim:r-- /home/admin/conf/web/ssl.example.com.pem
setfacl -m user:Debian-exim:r-- /home/admin/conf/web/ssl.example.com.key

chgrp mail /home/admin/conf/web/ssl.example.com.pem
chmod 660 /home/admin/conf/web/ssl.example.com.pem
chgrp mail /home/admin/conf/web/ssl.example.com.key
chmod 660 /home/admin/conf/web/ssl.example.com.key

Now you should be able to send email from a mail client without it complaining about certificates :)