-2

我刚刚用 courier 配置了一个后缀。我正在使用 tls 来获取和接收电子邮件。

我使用本指南配置 Ubuntu 的服务器(全新安装):http: //www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-12.10

使用 squirrelmail 网络客户端时,我可以发送和接收电子邮件,但使用 iPhone 或任何其他客户端时,我只能接收电子邮件。

我在指导方向上所做的唯一更改是我使用了远程 MySQL 服务器(在 amazon rds 上)而不是本地主机。

在我的服务器日志上,当我尝试发送电子邮件时,我收到以下消息:

Aug  3 08:10:34 ip-10-152-164-180 postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known
Aug  3 08:10:34 ip-10-152-164-180 postfix/smtpd[5728]: connect from unknown[93.37.128.33]
Aug  3 08:10:35 ip-10-152-164-180 postfix/smtpd[5728]: warning: SASL authentication failure: Password verification failed
Aug  3 08:10:35 ip-10-152-164-180 postfix/smtpd[5728]: warning: unknown[93.37.128.33]: SASL PLAIN authentication failed: authentication failure
Aug  3 08:10:35 ip-10-152-164-180 postfix/smtpd[5728]: lost connection after AUTH from unknown[93.37.128.33]
Aug  3 08:10:35 ip-10-152-164-180 postfix/smtpd[5728]: disconnect from unknown[193.37.128.333.37.128.33]
Aug  3 08:10:36 ip-10-152-164-180 postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known
Aug  3 08:10:36 ip-10-152-164-180 postfix/smtpd[5728]: connect from unknown[93.37.128.33]
Aug  3 08:10:37 ip-10-152-164-180 postfix/smtpd[5728]: warning: SASL authentication failure: Password verification failed
Aug  3 08:10:37 ip-10-152-164-180 postfix/smtpd[5728]: warning: unknown[93.37.128.33]: SASL PLAIN authentication failed: authentication failure
Aug  3 08:10:37 ip-10-152-164-180 postfix/smtpd[5728]: lost connection after AUTH from unknown[93.37.128.33]
Aug  3 08:10:37 ip-10-152-164-180 postfix/smtpd[5728]: disconnect from unknown[93.37.128.33]
Aug  3 08:10:37 ip-10-152-164-180 postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known
Aug  3 08:10:37 ip-10-152-164-180 postfix/smtpd[5728]: connect from unknown[93.37.128.33]
Aug  3 08:10:39 ip-10-152-164-180 postfix/smtpd[5728]: warning: SASL authentication failure: Password verification failed
Aug  3 08:10:39 ip-10-152-164-180 postfix/smtpd[5728]: warning: unknown[93.37.128.33]: SASL PLAIN authentication failed: authentication failure
Aug  3 08:10:39 ip-10-152-164-180 postfix/smtpd[5728]: lost connection after AUTH from unknown[93.37.128.33]
Aug  3 08:10:39 ip-10-152-164-180 postfix/smtpd[5728]: disconnect from unknown[93.37.128.33]
Aug  3 08:10:40 ip-10-152-164-180 postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known
Aug  3 08:10:40 ip-10-152-164-180 postfix/smtpd[5728]: connect from unknown[93.37.128.33]
Aug  3 08:10:41 ip-10-152-164-180 postfix/smtpd[5728]: warning: SASL authentication failure: Password verification failed
Aug  3 08:10:41 ip-10-152-164-180 postfix/smtpd[5728]: warning: unknown[93.37.128.33]: SASL PLAIN authentication failed: authentication failure
Aug  3 08:10:42 ip-10-152-164-180 postfix/smtpd[5728]: lost connection after AUTH from unknown[93.37.128.33]
Aug  3 08:10:42 ip-10-152-164-180 postfix/smtpd[5728]: disconnect from unknown[93.37.128.33]

有谁知道出了什么问题?

4

1 回答 1

0

我在前一周部署了 postfix,所以我是这个领域的新手,但正如我在您首先提供的日志中看到的那样,您会收到警告:

postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known

这意味着您必须127.0.0.1 spotCUST.spot.net在 /etc/hosts 中添加。

接下来的步骤是将 Postfix 配置为使用 SASL 进行 SMTP AUTH。确保您已安装模块:

sudo apt-get install libsasl2-2 libsasl2-modules

然后编辑 /etc/default/saslauthd 以激活 saslauthd。删除 START=yes 前面的 #,添加 PWDIR、PARAMS 和 PIDFILE 行并在末尾编辑 OPTIONS 行: # This needs to be uncommented before saslauthd will be run automatically START=yes

PWDIR="/var/spool/postfix/var/run/saslauthd" PARAMS="-m ${PWDIR}" PIDFILE="${PWDIR}/saslauthd.pid"

MECHANISMS="pam"

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

注意:如果您愿意,可以使用“shadow”代替“pam”。这将使用 MD5 散列密码传输并且非常安全。验证所需的用户名和密码将是您在服务器上使用的系统上的用户。接下来,更新 /var/spool/postfix/var/run/saslauthd 的 dpkg “状态”。saslauthd 初始化脚本使用此设置来创建具有适当权限和所有权的缺失目录(从未工作,目录有问题): dpkg-statoverride --force --update --add root sasl 755 /var/spool/postfix/var/run/saslauthd

这可能会报“--update given”和“/var/spool/postfix/var/run/saslauthd”目录不存在的错误。您可以忽略这一点,因为当您接下来启动 saslauthd 时,它将被创建。最后,启动 saslauthd: sudo /etc/init.d/saslauthd start

我是这个领域的新手,但这就是我在工作站工作时所做的。也许你会找到这个教程。这是我完成部署所遵循的。

于 2013-08-03T11:43:56.857 回答