Postfix: 禁用本地交货

我有一个带有主记录的邮件服务器 MX, 此邮件服务器处理包含所有邮箱和传出邮件。

我安装没有记录的第二个邮件服务器 MX, 但仅作为仅发送邮件的服务器,不接受来电。 该第二服务器仅用于从多个节点上加载平衡的网站发送邮件,并且只有Web服务器节点只能从该第二邮件服务器访问发送邮件。

上述所有工作都是完美的,我进来的问题是,当有人在网站上填写联系人表格时,我向发送表格的用户发送一封信,我也将表格的内容发送到信息信 site is example.com, 我发送了其中一个字母 info@example.com, 问题是发送电子邮件 info@example.com 它在服务器上本地处理,我希望它从第二邮件服务器从外部作为任何其他邮件。

邮件服务器

mail2.example.com

.

我希望它有意义。

main.cf

myhostname = mail2.example.com
mydomain = example.com
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
local_recipient_maps = unix:passwd.byname $alias_maps

# Custom changes
message_size_limit = 10485760
mailbox_size_limit = 0
always_add_missing_headers = yes

# Server
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/letsencrypt/live/mail2.example.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail2.example.com/privkey.pem
smtpd_tls_CApath = /etc/letsencrypt/live/mail2.example.com
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_mandatory_ciphers = high
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_eecdh_grade = strong

# Client
smtp_tls_loglevel = 1
smtp_tls_security_level = may
smtp_tls_cert_file = /etc/letsencrypt/live/mail2.example.com/fullchain.pem
smtp_tls_key_file = /etc/letsencrypt/live/mail2.example.com/privkey.pem
smtp_tls_CApath = /etc/letsencrypt/live/mail2.example.com
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_mandatory_exclude_ciphers = MD5 , DES, ADH, RC4, SRP, 3DES, eNULL
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
smtp_tls_mandatory_ciphers = high
已邀请:

卫东

赞同来自:

不像 mc0e, 谁了解这个问题,似乎你没有设置次要 MX. 相反,您需要服务器 (

mail2

) 对待

example.com

像任何其他域名。

解决这个问题是更容易的:只需删除

$mydomain

(IE

example.com

) 来自你的
http://www.postfix.org/postcon ... ation
, 因此:

mydestination = $myhostname, localhost.$mydomain, localhost

事实上,在更换变量后,就像它一样:

mydestination = mail2.example.com, localhost.example.com, localhost

这也是默认值

mydestination

, 因此,拆除整个行给出了相同的效果。

詹大官人

赞同来自:

你错过了所有必要的继电器 MX, 因此,我不是详细介绍,我将您发送到权威来源:
http://www.postfix.org/STANDAR ... ackup
.

要回复问题请先登录注册