Ubuntu 16.04问题与sendmail -sender地址无效

时间:2017-08-24 20:42:36

标签: sendmail ubuntu-16.04

我正在尝试从Unix机箱发送电子邮件。它工作得比较早,但现在却没有,我认为我对/etc/hosts进一步搞砸了。以下是测试结果:

echo "Subject: sendmail test" | sendmail -v exp@gmail.com
exp@gmail.com... Connecting to [127.0.0.1] via relay...
220 hugheseurope.com ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Thu, 24 Aug 2017 22:29:12 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO hugheseurope.com
250-hugheseurope.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<hnsuser@hugheseurope.com> SIZE=23 AUTH=hnsuser@hugheseurope.com
250 2.1.0 <hnsuser@hugheseurope.com>... Sender ok
>>> RCPT To:<exp@gmail.com>
>>> DATA
250 2.1.5 <immadolev@gmail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <exp@gmail.com>... Connecting to gmail-smtp-in.l.google.com. via esmtp...
050 220 mx.google.com ESMTP 40si3960062wrz.258 - gsmtp
050 >>> EHLO hugheseurope.com
050 250-mx.google.com at your service, [192.168.1.1]
050 250-SIZE 157286400
050 250-8BITMIME
050 250-STARTTLS
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-CHUNKING
050 250 SMTPUTF8
050 >>> STARTTLS
050 220 2.0.0 Ready to start TLS
050 >>> EHLO hugheseurope.com
050 250-mx.google.com at your service, [192.168.1.1]
050 250-SIZE 157286400
050 250-8BITMIME
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-CHUNKING
050 250 SMTPUTF8
050 >>> MAIL From:<hnsuser@scan@hugheseurope.com> SIZE=310
050 553-5.1.2 The sender address <hnsuser@scan@hugheseurope.com> is not a valid
050 553 5.1.2 RFC-5321 address. 40si3960062wrz.258 - gsmtp
050 <hnsuser@hugheseurope.com>... Connecting to local...
050 <hnsuser@hugheseurope.com>... Sent
250 2.0.0 v7OKTCHO001397 Message accepted for delivery
exp@gmail.com... Sent (v7OKTCHO001397 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 hugheseurope.com closing connection

我从哪里得到这条线:为什么现在是hnsuser @ scan @ hugheseurope.com?

  050 >>> MAIL From:<hnsuser@scan@hugheseurope.com> SIZE=310
        050 553-5.1.2 The sender address <hnsuser@scan@hugheseurope.com> is not a valid

还有以下内容:

Aug 24 22:29:12 hugheseurope.com sm-mta[1397]: v7OKTCHO001397: from=<hnsuser@hugheseurope.com>, size=310, class=0, nrcpts=1, msgid=<201708242029.v7OKTCdj001396@hugheseurope.com>, proto=ESMT
Aug 24 22:29:12 hugheseurope.com sm-mta[1397]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Aug 24 22:29:12 hugheseurope.com sm-mta[1397]: v7OKTCHO001397: to=<exp@gmail.com>, ctladdr=<hnsuser@hugheseurope.com> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=3
Aug 24 22:29:12 hugheseurope.com sm-mta[1397]: v7OKTCHO001397: v7OKTCHP001397: DSN: Data format error

1 个答案:

答案 0 :(得分:1)

以root身份执行下面的测试脚本:

#!/bin/sh
/usr/sbin/sedndmail -d60.5 -bt <<END
/tryflags es
/try esmtp hnsuser@hugheseurope.com
END

它应该减少&#34;怀疑列表&#34;。