当我尝试使用以下命令以root身份发送电子邮件时,电子邮件成功发送:
echo "Test" | sendmail -r user@mydomain.com myemail@gmail.com
但是当我发送电子邮件时,使用相同的命令,作为不同的用户,即使它在日志中成功,它也不会发送电子邮件。
以root身份登录:
Jun 16 11:28:53 mydomain postfix/pickup[2163]: 34AF541D1C: uid=0 from=<user@mydomain.com>
Jun 16 11:28:53 mydomain postfix/cleanup[3168]: 34AF541D1C: message-id=<20140616112853.34AF541D1C@mydomain.com>
Jun 16 11:28:53 mydomain postfix/qmgr[2164]: 34AF541D1C: from=<user@mydomain.com>, size=247, nrcpt=1 (queue active)
Jun 16 11:29:06 mydomain postfix/smtp[3170]: 34AF541D1C: to=<myemail@gmail.com>, relay=spmail-sms-gw.cloudmark.com[66.151.128.162]:25, delay=13, delays=0.03/0.01/7.2/6.2, dsn=2.0.0, status=sent (250 2.0.0 EzUt1o001190bAS01zV09C mail accepted for delivery)
Jun 16 11:29:06 mydomain postfix/qmgr[2164]: 34AF541D1C: removed
以其他用户身份登录:
Jun 16 11:29:53 mydomain postfix/pickup[2163]: 34AF541D1C: uid=1000 from=<user@mydomain.com>
Jun 16 11:29:53 mydomain postfix/cleanup[3168]: 34AF541D1C: message-id=<20140616112953.34AF541D1C@mydomain.com>
Jun 16 11:29:53 mydomain postfix/qmgr[2164]: 34AF541D1C: from=<user@mydomain.com>, size=247, nrcpt=1 (queue active)
Jun 16 11:30:06 mydomain postfix/smtp[3170]: 34AF541D1C: to=<myemail@gmail.com>, relay=spmail-sms-gw.cloudmark.com[66.151.128.162]:25, delay=13, delays=0.03/0.01/7.2/6.2, dsn=2.0.0, status=sent (250 2.0.0 EzUt1o0014340bAS01zV09C mail accepted for delivery)
Jun 16 11:30:06 mydomain postfix/qmgr[2164]: 34AF541D1C: removed