Zabbix mstmp+Mutt发邮件注意权限

root@tw-mtj-223:~# su zabbix

$ cd ^H^H^H^H^C

$ echo "test"|mutt -s "test" [email protected]

msmtp: authentication failed (method LOGIN)

msmtp: server message: 550 User has no permission

msmtp: could not send mail (account default from /home/zabbix/.msmtprc)

msmtp: cannot log to /usr/local/msmtp/msmtp.log: cannot open: Permission denied

msmtp: log info was: host=smtp.163.com tls=off auth=on [email protected] [email protected] [email protected] smtpstatus=550 smtpmsg='550 User has no permission' errormsg='authentication failed (method LOGIN)' exitcode=EX_NOPERM

Error sending message, child exited 77 (Insufficient permission.).

Could not send the message.

$ exit

root@tw-mtj-223:~# cp .msmtprc /home/zabbix/

root@tw-mtj-223:~# chown -R zabbix:zabbix /home/zabbix/

root@tw-mtj-223:~# chown -R zabbix:zabbix /usr/local/msmtp/

root@tw-mtj-223:~# su zabbix

$ ^[[A^[[A^C

$ echo "test"|mutt -s "test" [email protected]


你可能感兴趣的:(zabbix)