我刚用快递配置了一个后缀。我正在使用tls来接收和接收电子邮件。
我使用本指南配置Ubuntu的服务器(全新安装):http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-12.10
使用squirrelmail webclient时,我可以发送和接收电子邮件,但在使用我的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]
有没有人知道出了什么问题?
答案 0 :(得分:0)
我在前一周部署了postfix,所以我是这个领域的新手,但正如我在你提供的日志中看到的那样,你会收到警告:
postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known
这意味着您必须在/ etc / hosts中添加127.0.0.1 spotCUST.spot.net
。
接下来的步骤是将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 init脚本使用此设置来创建具有适当权限和所有权的缺失目录(从不工作,与DIRECTORIES有问题):
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
我是这个领域的新手,但这就是我在工作站上工作的原因。 也许你找到了this tutorial。这是我完成部署所遵循的内容。