0

我已经在 HYPER-V (Windows 8.1) 中安装了 Ubuntu 14 LTS。使用 apt-get 安装了 mailutils 和 sendmail。但我无法使用这两个程序发送邮件。连接和一切都正确,我在 Windows 8.1 或 sendmail/mailx 中配置的东西?

问候,奢华

4

1 回答 1

0

使用以下测试脚本以详细模式发送电子邮件以诊断您的问题。

以下脚本应由非root用户执行:

#!/bin/sh
# send test email as normal (non root) user
# change RECIPIENT to valid email address
RECIPIENT=john.doe@example.net
/usr/sbin/sendmail -i -v $RECIPIENT <<END
subject: test email (non root)

test
END

以下脚本应由root用户执行:

#!/bin/sh
# send test email as privileged (root) user
# change RECIPIENT to valid email address
RECIPIENT=john.doe@example.net
/usr/sbin/sendmail -Am -i -v $RECIPIENT <<END
subject: test email (root)

test
END
于 2015-07-21T18:01:36.177 回答