Home / Community / Blog

To allow backuppc user to send emails I've to change permissions to /etc/msmtprc file:

chmod a+r /etc/msmtprc

Now I can send email as backuppc, but there is a problem with logging:

root@NAS:~# sudo -u backuppc /usr/sbin/sendmail jaqb@mydomain.com
subject:test
from:backuppc@nas
this is a test

sendmail: cannot log to /var/log/frontview/msmtp.log: \
          cannot open: Permission denied
sendmail: log info was: host=mail.mydomain.com tls=on auth=on \
          user=jaqb from=jaqb@mydomain.com \
          recipients=jaqb@mydomain.com mailsize=90 smtpstatus=250 \
          smtpmsg='250 2.0.0 Ok: queued as E29FC1665F31' exitcode=EX_OK

(after "this is a test") you have to press Ctrl-D (end of file).

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31