大网数据广告活动
服务器运维问答

Sendmail and Gmail

· 52CE 我爱测

I'm trying to send email with sendmail. I followed this how-to: http://linuxconfig.org/configuring-gmail-as-sendmail-email-relay I tried to send the email over console: echo "Just testing my sendmail gmail relay" | mail -v -s "Se…

问题原文

原帖链接 · aemerich · CC BY-SA 3.0

I'm trying to send email with sendmail. I followed this how-to: http://linuxconfig.org/configuring-gmail-as-sendmail-email-relay

I tried to send the email over console:

echo "Just testing my sendmail gmail relay" | mail -v -s "Sendmail gmail Relay - New Server" user@gmailcom

The output of command is:

WARNING: local host name (server01) is not qualified; see cf/README: WHO AM I?
[email omitted]... Connecting to [127.0.0.1] via relay...
220 server01 ESMTP Sendmail 8.14.4/8.14.4; Thu, 10 Dec 2015 18:05:36 -0200
>>> EHLO server01
250-server01 Hello server1 [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@server01> SIZE=279
250 2.1.0 <root@server01>... Sender ok
>>> RCPT To:<[email omitted]>
>>> DATA
250 2.1.5 <[email omitted]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 tBAK5aGc015664 Message accepted for delivery
[email omitted]... Sent (tBAK5aGc015664 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT

221 2.0.0 server01 closing connection But the e-mail never arrives. Can you guys help me?

Logs:

Dec 10 19:03:31 server01 sendmail[16310]: tBAL3Uua016310: from=root, size=279, class=0, nrcpts=1, msgid=<201512102103.tBAL3Uua016310@server01>, relay=root@localhost
Dec 10 19:03:31 server01 sendmail[16311]: tBAL3VCu016311: from=<root@server01>, size=524, class=0, nrcpts=1, msgid=<201512102103.tBAL3Uua016310@server01>, proto=ESMTP, daemon=MTA, relay=corp-poa-pabx1 [127.0.0.1]
Dec 10 19:03:31 server01 sendmail[16310]: tBAL3Uua016310: to=[email omitted], ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30279, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (tBAL3VCu016311 Message accepted for delivery)
Dec 10 19:03:32 server01 sendmail[16313]: STARTTLS=client, relay=gmail-smtp-msa.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Dec 10 19:03:33 server01 sendmail[16313]: tBAL3VCu016311: to=<[email omitted]>, ctladdr=<root@server01> (0/0), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=120524, relay=gmail-smtp-msa.l.google.com. [64.233.190.108], dsn=5.0.0, stat=Service unavailable
Dec 10 19:03:33 server01 sendmail[16313]: tBAL3VCu016311: tBAL3XCu016313: DSN: Service unavailable
Dec 10 19:03:33 server01 sendmail[16313]: tBAL3XCu016313: to=<root@server01>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31757, dsn=2.0.0, stat=Sent

Thanks in advance..

社区高分解答

原帖链接 · AnFi onet.eu · CC BY-SA 4.0

Sendmail - debugging outgoing SMTP session

Gmail refused to accept your email.

Dec 10 19:03:33 server01 sendmail[16313]: tBAL3VCu016311: to=[email omitted], ctladdr=root@server01 (0/0), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=120524, relay=gmail-smtp-msa.l.google.com. [64.233.190.108], dsn=5.0.0, stat=Service unavailable

As root execute the command below to send a test message in verbose mode
(you will see SMTP session transcript):

(echo Subject: test; echo; echo test)|/usr/sbin/sendmail -Am -i -v [email omitted]

You may add -d60.5 to sendmail command line options (before recipient address) to trace map/database lookups including authinfo lookups (search for passwords for SMTP AUTH).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-12-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。