中繼主機變更

中繼主機變更

我將 example.com 設定為使用中繼 mailjet.com 以及與之關聯的電子郵件,例如[電子郵件受保護]想要這個[電子郵件受保護]使用另一個中繼,即 smtp-int.xyz.com,它基本上在我公司內部路由。任何傳送至 @xyz.com 的內容都透過 smtp-int.xyz.com 路由 這可能嗎?我嘗試新增條目[電子郵件受保護]在/etc/postfix/senders_relay 中並重新加載postfix 但它沒有幫助......我也嘗試將其添加到/etc/postfix/transport 中,這也沒有幫助......可能是我正在做某事錯誤的....

/etc/postfix/sender_relay
@example.com    in-v3.mailjet.com

/etc/postfix/transport
xyz.com           smtp:smtp-int.xyz.com
example.com    smtp:in-v3.mailjet.com

/etc/postfix/main.cf
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
header_checks = regexp:/etc/postfix/header_checks
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = $myhostname, mca-xyz.com, localhost
myhostname = mca-xyz.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/allowed_senders
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level = may
transport_maps = regexp:/etc/postfix/discard

一些日誌:11 月16 日05:06:27 mca-xyz.com postfix/cleanup[557307]: 7FB925F925: warning: header 主題:Wildfly AS DOPS (mca04.xyz.com) 從mca04.xyz.com[xxx. xxx.com] 重新啟動正常。[電子郵件受保護] [電子郵件受保護]proto=SMTP helo=<mca04.xyz.com> 11 月 16 日 05:06:27 mca-xyz.com postfix/smtp[557560]:7FB925F925:[電子郵件受保護],中繼=in.mailjet.com[xxx.xxx.xx.xx]:25,延遲=0.26,延遲=0.01/0/0.17/0.08,dsn=2.0.0,狀態=已發送(250 OK 排隊為5bd486ec-8825-4d16-ad5f-71f18603b43 )

相關內容