sendmail 在 Ubuntu 16.04 LTS 上不起作用

sendmail 在 Ubuntu 16.04 LTS 上不起作用

我使用以下命令在我的服务器上安装了 sendmail:

sudo apt-get install sendmail
sudo sendmailconfig

运行之前,sudo sendmailconfig我已将服务器主机名添加到我的/etc/hosts。现在,当我尝试运行 sendmail 时,它就卡住了。

> echo "Subject: sendmail test" | sendmail -v [email protected]
[email protected]... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Sun, 12 Nov 2017 13:02:49 GMT; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO localhost.localdomain
250-localhost.localdomain 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:<[email protected]> SIZE=23 [email protected]
250 2.1.0 <[email protected]>... Sender ok
>>> RCPT To:<[email protected]>
>>> DATA
250 2.1.5 <[email protected]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .

我不知道该如何修复这个问题。我启用了防火墙,但所有出站端口都允许访问。

电子邮件已添加到邮件队列但超时。

> sudo mailq

vACD6HYe002871*       0 Sun Nov 12 13:06 <[email protected]>
                 (Deferred: Connection timed out with aspmx2.googlemail.com.)
                 <[email protected]>

相关内容