窝窝插件 发表于 2019-1-21 09:54:51

Zabbix mstmp+Mutt发邮件注意权限

  root@tw-mtj-223:~# su zabbix
  $
  $ cd ^H^H^H^H^C
  $ echo "test"|mutt -s "test" sasas@qq.com
  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 user=asdas3@163.com from=dasd@163.com recipients=asda@15166.com 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" sasas@qq.com
  




页: [1]
查看完整版本: Zabbix mstmp+Mutt发邮件注意权限