小编use*_*631的帖子

使用 postfix 停止将本地电子邮件发送到中继主机

我最近注册了 SMTP2GO (smtpcorp)。我已经在其中一台 EC2 服务器上设置了 postfix 并将其指向我的 smtp2go 帐户:

relayhost = [smtpcorp.com]:2525
Run Code Online (Sandbox Code Playgroud)

现在我所有的邮件都通过 SMTP2GO 路由,但问题是,由 cron 作业等生成的 1000 多封电子邮件正在使用电子邮件地址发送到 SMTP2GO:

root@ec2-46-51-151-256.eu-west-1.compute.amazonaws.com
Run Code Online (Sandbox Code Playgroud)

我的问题是,阻止所有这些“本地”电子邮件被路由到 SMTP2GO 的最佳方法是什么?

谢谢

马丁

我的主要.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no


readme_directory = no

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache



myhostname = ec2-46-51-151-256.eu-west-1.compute.amazonaws.com

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname

mydestination = ec2-46-51-151-256.eu-west-1.compute.amazonaws.com, localhost.eu-west-1.compute.internal, localhost

relayhost = [smtpcorp.com]:2525
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:account:password
smtp_sasl_security_options = noanonymous …
Run Code Online (Sandbox Code Playgroud)

email ubuntu postfix route local

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

email ×1

local ×1

postfix ×1

route ×1

ubuntu ×1