我已将 sendmail 配置为使用 gmail。这是我得到的输出,但我没有收到邮件。可能是什么问题
prashanth@prashanth-laptop:~$ sendmail -v *********.*******@gmail.com < test.mail
WARNING: local host name (prashanth-laptop) is not qualified; see cf/README: WHO AM I?
*********.*******@gmail.com... Connecting to [127.0.0.1] via relay...
220 prashanth-laptop ESMTP Sendmail 8.14.3/8.14.3/Debian-9.1ubuntu1; Fri, 2 Sep 2011 12:31:15 +0530; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO prashanth-laptop
250-prashanth-laptop Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
2 50-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<prashanth@prashanth-laptop> SIZE=45
250 2.1.0 <prashanth@prashanth-laptop>... Sender ok
>>> RCPT To:<*********.*******@gmail.com>
>>> DATA
250 2.1.5 <*********.*******@gmail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <*********.*******@gmail.com>... Connecting to smtp.gmail.com port 587 via relay...
050 220 mx.google.com ESMTP e3sm8203378pbi.7
050 >>> EHLO prashanth-laptop
050 250-mx.google.com at your service, [117.197.206.85]
050 250-SIZE 35882577
050 250-8BITMIME
050 250-STARTTLS
050 250 ENHANCEDSTATUSCODES
050 >>> STARTTLS
050 220 2.0.0 Ready to start TLS
050 >>> EHLO prashanth-laptop
050 250-mx.google.com at your service, [117.197.206.85]
0 50 250-SIZE 35882577
050 250-8BITMIME
050 250-AUTH LOGIN PLAIN XOAUTH
050 250 ENHANCEDSTATUSCODES
050 >>> MAIL From:<prashanth@prashanth-laptop> SIZE=353
050 530-5.5.1 Authentication Required. Learn more at
050 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 e3sm8203378pbi.7
050 <prashanth@prashanth-laptop>... Connecting to local...
050 <prashanth@prashanth-laptop>... Sent
250 2.0.0 p8271FSG017551 Message accepted for delivery
*********.*******@gmail.com... Sent (p8271FSG017551 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 prashanth-laptop closing connection
答案1
您正在尝试使用端口 587,但尚未进行身份验证。
您理解警告和错误消息吗?您还需要将 FQDN 添加到您的外发邮件中。
您使用 Sendmail 有什么特别的原因吗?如果您没有充分的理由坚持使用 Sendmail,我建议您使用 Postfix。