In /etc/msmtprc
I added credentials for a gmail account and also specified a log file to use in /var/log/msmtp/msmtp.log
I also created the folder and file in /var/log/msmtp/msmtp.log
When I test it using: echo "This is a test e-mail from my server using msmtp!" | msmtp ******@gmail.com
I receive an email but in the terminal I also see an error message like so: msmtp: cannot log to /var/log/msmtp/msmtp.log: cannot open: Permission denied
The current permissions for /var/log/msmtp
are:
drwxr-xr-x 2 root root 4096 Jan 29 20:19 msmtp
What am I doing wrong? What do the permissions on the log file need to be for msmtp to be able to write to the file?