我通过这个教程创build了邮件服务器http://www.unixmen.com/install-postfix-mail-server-with-dovecot-and-squirrelmail-on-centos-6-4/
我可以发送电子邮件给自己它工作正常,但是当我想发送到另一个域邮件显示错误:
Message not sent. Server replied: Transaction failed 554 5.7.1 <[email protected]>: Relay access denied
在该教程中,它表示设置DNS服务器并添加邮件服务器MXlogging。 需要吗? 要发送邮件到另一个域? 也许这是一个问题?
邮件日志
Jun 27 07:14:52 mobifor postfix/smtpd[1822]: connect from localhost[::1] Jun 27 07:14:52 mobifor postfix/smtpd[1822]: NOQUEUE: reject: RCPT from localhost[::1]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[129.233.111.73]> Jun 27 07:14:52 mobifor postfix/smtpd[1822]: lost connection after RCPT from localhost[::1] Jun 27 07:14:52 mobifor postfix/smtpd[1822]: disconnect from localhost[::1]
它看起来像连接到错误的SMTP端口,或者您有一个不好的smtpd_recipient_restrictions 。
大多数SMTP设置的开放端口为其他服务器提供邮件到本地帐户(和465为TLS变体)和一个额外的端口587(称为submission )本地用户发送邮件到外国主机。 您可以在master.cf中激活这些,并应用不同的configuration。 例如,这可能是在master.cf中提交的代码片段(不完整,只适用于这种情况!):
submission inet n - - - - smtpd -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,reject
你可以看到每个连接的人都必须authentication( permit_sasl_authenticated ),然后才能发送任何邮件。 这将覆盖main.cf中的configuration,该configuration禁止未在mydestination列出的域的本地邮件传递。 但是,如果发送本地邮件给其他人,你不希望这样做。
为了获得更具体的帮助,如果您可以提供您当前的configuration,这将非常有用。