I'm just starting with my own Virtual Server (and Linux). I've an apache2 and a few WordPress sites. I need to send mails via PHP (contact forms). I managed to install ssmtp with the help of a few tutorials. It sends mail with an gmail account. I'm not sure about the right permissions of the ssmtp.conf:
chmod 600 /etc/ssmtp/ssmtp.conf I cant't send mails from the commandline, php-contact forms are also not working.
chmod 640 /etc/ssmtp/ssmtp.conf I can send mails from the commandline, but php-contact forms are not working.
chmod 666 /etc/ssmtp/ssmtp.conf I can't send mails from the commandline and php-contact forms are working fine.
Obviously I would like to stay with 666, but I'm not sure if this could be a security problem.