我在设置 Ubuntu 服务器安装以发送/接收电子邮件时遇到了麻烦。我对这些都不太熟悉,所以如果我没有提供足够/正确的信息,我深表歉意。如果您还有其他需要,请告诉我。我不知道下一步该怎么做。
我已经正确设置了服务器并且已经通过 SSH 进入该服务器。
当我尝试使用以下命令从命令行发送电子邮件时:
mmail [email protected]
Cc: [email protected]
Subject: Test
This is a test
我在我的/var/log/mail.log
Nov 29 23:13:44 mikeserver postfix/pickup[24226]: 0A60F63E007E: uid=1000 from=<mike@mikeserver>
Nov 29 23:13:44 mikeserver postfix/cleanup[26218]: 0A60F63E007E: message-id=<20141129231344.0A60F63E007E@mikeserver>
Nov 29 23:13:44 mikeserver postfix/qmgr[24227]: 0A60F63E007E: from=<mike@mikeserver>, size=381, nrcpt=2 (queue active)
Nov 29 23:13:45 mikeserver postfix/smtp[25920]: 0A60F63E007E: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[173.194.67.27]:25, delay=1.8, delays=0.08/0/1.3/0.46, dsn=2.0.0, status=sent (250 2.0.0 OK 1417302826 q5si38702680wia.0 - gsmtp)
Nov 29 23:13:48 mikeserver postfix/smtp[26219]: 0A60F63E007E: to=<[email protected]>, relay=mail.example.com[111.222.333.444]:25, delay=4.9, delays=0.08/0.01/4.3/0.5, dsn=5.0.0, status=bounced (host mail.exampleid: 550-Verification failed for <mike@mikeserver> 550-The mail server could not deliver mail to mike@mikeserver. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))
Nov 29 23:13:49 mikeserver postfix/cleanup[26218]: 46C4163E007F: message-id=<20141129231349.46C4163E007F@mikeserver>
Nov 29 23:13:49 mikeserver postfix/bounce[26225]: 0A60F63E007E: sender non-delivery notification: 46C4163E007F
Nov 29 23:13:49 mikeserver postfix/qmgr[24227]: 46C4163E007F: from=<>, size=2631, nrcpt=1 (queue active)
Nov 29 23:13:49 mikeserver postfix/qmgr[24227]: 0A60F63E007E: removed
Nov 29 23:13:49 mikeserver postfix/local[26226]: 46C4163E007F: to=<mike@mikeserver>, relay=local, delay=0.15, delays=0.08/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to maildir)
Nov 29 23:13:49 mikeserver postfix/qmgr[24227]: 46C4163E007F: removed
我也收到了这条消息OS X Mac 邮件客户端
This is the mail system at host mikeserver.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[email protected]>: host mail.example.com[111.222.333.444] said:
550-Verification failed for <mike@mikeserver> 550-The mail server could not
deliver mail to mike@mikeserver. The account or domain may not exist, they
may be blacklisted, or missing the proper dns entries. 550 Sender verify
failed (in reply to RCPT TO command)
Reporting-MTA: dns; mikeserver
X-Postfix-Queue-ID: 8038563E007C
X-Postfix-Sender: rfc822; mike@mikeserver
Arrival-Date: Sat, 29 Nov 2014 22:47:58 +0000 (GMT)
Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.0.0
Remote-MTA: dns; mail.example.com
Diagnostic-Code: smtp; 550-Verification failed for <mike@mikeserver> 550-The
mail server could not deliver mail to mike@mikeserver. The account or
domain may not exist, they may be blacklisted, or missing the proper dns
entries. 550 Sender verify failed
当我尝试从服务器发送电子邮件到任何地址时,我收到以下返回消息
Transcript of session follows.
Out: 220 mikeserver ESMTP Postfix (Ubuntu)
In: EHLO [192.168.0.12]
Out: 250-mikeserver
Out: 250-PIPELINING
Out: 250-SIZE 10240000
Out: 250-VRFY
Out: 250-ETRN
Out: 250-STARTTLS
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250 DSN
In: STARTTLS
Out: 220 2.0.0 Ready to start TLS
In: EHLO [192.168.0.12]
Out: 250-mikeserver
Out: 250-PIPELINING
Out: 250-SIZE 10240000
Out: 250-VRFY
Out: 250-ETRN
Out: 250-AUTH PLAIN
Out: 250-AUTH=PLAIN
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250 DSN
In: AUTH PLAIN bWlrZQBtaWtlAHBhc3N3b3Jk
Out: 235 2.7.0 Authentication successful
In: MAIL FROM:<mike@mikeserver>
Out: 250 2.1.0 Ok
In: RCPT TO:<[email protected]>
Out: 451 4.3.5 Server configuration error
In: RCPT TO:<[email protected]>
Out: 451 4.3.5 Server configuration error
In: QUIT
Out: 221 2.0.0 Bye
但是 OS X Mac Mail Connection Doctor 可以正常连接到服务器的 IMAP 和 SMTP
从 OS X 终端运行lab_release -a
会出现以下结果。
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic
任何信息都非常感谢。我已经为此花了好几个小时。即使只是为了让我提供更多信息。我不知道下一步该去哪里。
答案1
您正在将来自 mike@mikeserver 的邮件发送到外部域。此域检查发送邮件的地址是否存在(反垃圾邮件策略)。mike@mikeserver 不是互联网上现有的名称,因此邮件被退回(发件人验证失败)。
在这种情况下,只需将您的发送地址调整为存在的域即可。但是,许多服务器还会检查您的反向 DNS 以匹配您的 HELO/EHLO,因此您的标识应该与大多数域的反向 DNS 相同,以便能够向其发送邮件。
答案2
您正尝试从 mikeserver 发送邮件,但这不是 fqdn。我假设 mikeserver 是您通过拨号连接的家庭计算机?您应该使用邮件中继从您的家庭计算机发送邮件。如果它是具有静态 IP 的服务器,您必须检查 DNS 名称解析是否向前和向后工作,您的 mx 记录是否设置正确(mikeserver.yourdomain.tld)以及您的服务器的邮件名称是否设置正确。您还应该为您的服务器提供有效的 spf 记录。