我正在尝试为我的 LAN 设置一个后缀中继系统。我的很多服务都被 WAN 访问阻止了,我希望能够从它们那里获得通知。
就目前而言,它目前“有效”,但每封电子邮件都附有“Mailer Deamon Undeliverable”电子邮件,因为它发送正确但始终尝试密件抄送:[email protected]
无法解决。我只将@domain.com 用于电子邮件。
这是我对“来宾”VM 的配置(通过 发送relayhost
),我已经尝试了很多,但没有任何想法,感谢您的帮助。
我想知道我是否可以在relayhost
vs 客人中以某种方式解决这个问题?
/etc/postfix/main.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
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = domain.com
mydestination = domain.com, localhost
relayhost = smtp.domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all
masquerade_domains = domain.com
#THINGS I HAVE TRIED...##
#smtp_header_checks = regexp:/etc/postfix/header_checks
#transport_maps = hash:/etc/postfix/transport
#smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/bad_recipients, permit_mynetworks, reject_unauth_destination, permit
#transport_maps = pcre:/etc/postfix/transport_maps
#smtp_generic_maps = hash:/etc/postfix/generic
/etc/aliases
postmaster: root
root: [email protected]
trash: /tmp/mail.trash
我有一个问题
mydestination
。我不应该domain.com
在那个领域。我将其删除并将其设置为mydestination = hostname hostname.domain.com localhost
,现在它按预期工作。