我已经在Raspberry Pi 3 Model B +的Raspbian上安装了MUTT和sendmail,但下面的电子邮件未通过,这是mail.log的输出
cat /var/log/mail.log
Mar 16 23:07:45 raspberrypi sm-mta[6483]: x2GHHWwC006041: to=
<nxxxxxx@machinelearningcasestudies.com>, ctladdr=<root@raspberrypi> (0/0),
delay=00:20:13, xdelay=00:00:16, mailer=esmtp, pri=300490,
relay=mail.machinelearningcasestudies.com. [50.87.248.32], dsn=4.0.0,
stat=Deferred: Connection reset by mail.machinelearningcasestudies.com.
Mar 16 23:08:51 raspberrypi sendmail[6515]: My unqualified host name
(raspberrypi) unknown; sleeping for retry
root@raspberrypi:/home/pi# echo "test" | sendmail -s Hello world
nxxxxxxxx@machinelearningcasestudies.com
OR
root@raspberrypi:/home/pi# echo test | mutt -s "Testing"
nxxxxxxxx@machinelearningcasestudies.com
The .muttrc file looks like this:
set my_address = "nxxxxxx@machinelearningcasestudies.com"
set smtp_pass = "XxXxXxX"
set imap_user = $my_address
set imap_pass = $smtp_pass
set smtp_url = smtps://$imap_user@mail.machinelearningcasestudies.com:587/
set folder = imaps://imap.mail.machinelearningcasestudies.com:143
set postpones = Drafts
unset record # Gmail does this automatically
set spoolfile = +INBOX
mailboxes +INBOX
set from = $my_address
alternates $my_address
set message_cachedir = ~/.cache/mutt
set header_cache = $message_cachedir
我的电子邮件提供商提供的Webmail设置如下:
Username: nxxxxxx@XYZ.com
Password: Use the email account’s password.
Incoming Server: mail.XYZ.com
IMAP Port: 143 POP3 Port: 110
Outgoing Server: mail.XYZ.com
SMTP Port: 587
我在Clawsmail电子邮件客户端中使用了上述设置,并且它发送和接收电子邮件没有任何错误。这些命令行工具mutt和sendmail无法正常工作。 假设用户名和密码正确,为什么您认为mutt和sendmail没有将电子邮件发送到目的地? 非常感谢您的帮助。