首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >客户端没有作为此发件人发送的权限

问客户端没有作为此发件人发送的权限
EN

Unix & Linux用户
提问于 2014-04-01 08:57:08
回答 1查看 1.9K关注 0票数 1

平台: Arch Linux Cron: cronie Mail: msmtp

我发现将cron输出发送到Office 365托管的邮箱会产生以下错误,即使通过CLI发送邮件运行良好:

代码语言:javascript
复制
Apr 01 04:41:10 prod crond[306]: msmtp: the server did not accept the mail
Apr 01 04:41:10 prod crond[306]: msmtp: server message: 550 5.7.1 Client does not have permissions to send as this sender
Apr 01 04:41:10 prod crond[306]: msmtp: could not send mail (account default from /etc/msmtprc)
Apr 01 04:41:10 prod crond[306]: msmtp: cannot log to /var/log/msmtp.log: cannot open: Permission denied
Apr 01 04:41:10 prod crond[306]: msmtp: log info was: host=smtp.office365.com tls=on auth=on user=cron@domain.com from=cron@domain.com recipients=recipient@domain.com smtpstatus=550 smtpmsg='550 5.7.1 Client does not have permissions to send as this sender' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
Apr 01 04:41:10 prod CROND[3212]: (postgres) MAIL (mailed 29 bytes of output but got status 0x0045                                         )
Apr 01 04:41:10 prod CROND[3212]: pam_unix(crond:session): session closed for user postgres
EN

回答 1

Unix & Linux用户

发布于 2014-04-01 08:57:08

解决方案是,除了MAILTO之外,我还需要向crontab添加以下内容:

代码语言:javascript
复制
MAILFROM=cron@domain.com
票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/122538

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档