我正在尝试让 sendmail 与 aws 配合使用。使用这附加信息以及亚马逊 sendmail 设置说明我可以从命令行成功发送邮件。
当我尝试通过我的应用程序发送它时,我的邮件日志中出现以下内容,并且没有收到任何邮件。
有人能告诉我这是什么意思吗?我不确定如何解决这个问题,也不知道接下来该怎么办。
sendmail[20162]: starting daemon (8.14.4): SMTP+queueing@01:00:00
sm-msp-queue[20170]: starting daemon (8.14.4): queueing@01:00:00
sendmail[20174]: kVR020174: From:... List:; syntax illegal for recipient addresses
sendmail[20174]: kVR020174: Reply-To:... List:; syntax illegal for recipient addresses
sendmail[20174]: kVR020174: from=apache, size=150, class=0, nrcpts=1, msgid=<[email protected]>, relay=apache@localhost
sendmail[20175]: kK5020175: from=<[email protected]>, size=452, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=localhost [1$
sendmail[20174]: kVR020174: to='[email protected], ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30150, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (kK5020$
sendmail[20174]: kVR020174: kVS020174: DSN: Reply-To:... List:; syntax illegal for recipient addresses
sendmail[20175]: kK7020175: from=<>, size=2130, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
sendmail[20174]: kVS020174: to=apache, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31174, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (kK7020175 Message accepted for delivery)
sendmail[20179]: kK7020175: to=root, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=32360, dsn=2.0.0, stat=Sent
sendmail[20177]: kK5020175: to=<[email protected]>, ctladdr=<[email protected]> (48/48), delay=00:00:11, xdelay=00:00:11, mailer=aws-email, pri=120452, relay=mydomain.$
sendmail[20177]: kK5020175: p8E9qVK5020177: DSN: unknown mailer error 32
sendmail[20177]: qVK5020177: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31723, dsn=2.0.0, stat=Sent
编辑附加信息
sendmail.cf [根据 aws 配置] 或 sendmail.mc [根据其他配置选项]
Maws-email, P=/opt/aws/ses/ses-send-email.pl, F=mDFMuXn, U=mailuser,
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, A=ses-send-email.pl -r -k /opt/aws
/aws-credentials -e https://email.us-east-1.amazonaws.com -f $f $u
添加了邮件用户
密码文件 /etc/passwd
mailuser:*:12345:12345: mailuser:/no/where:/no/shell
/etc/组
mailuser:*:12345:
答案1
信息可以在未知邮件程序错误 32 行中找到。这意味着本地邮件程序(在 sendmail 配置中的 M 行上定义)出现问题,并且该错误不在已知错误范围内(64-78)
我猜测您没有正确设置邮件转发。
答案2
这里我们选择了不同的方法。改用 PostFix。
答案3
我知道这个帖子很旧,但它可能会对看到此错误的人有所帮助。如果您使用的是非生产模式,则需要在 Amazon SES 上验证发件人和收件人的电子邮件地址。验证完成后,如果您将验证后的地址放入 sendmail-cf 中并指定可执行文件的路径,这将很有帮助,
Maws-email, P=/opt/aws/ses/ses-send-email.pl, F=mDFMuXn, U=mailuser,
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, A=ses-send-email.pl -r -k /opt/aws
/aws-credentials -e https://email.us-east-1.amazonaws.com -f [email protected] $u