我有一个配置为通过本地网络邮件中继发送 Postfix 的 Ubuntu 18.04 服务器。
只有在生成消息时,cron
它才会在From:
标头中包含以下内容:
From: [email protected] (Cron Daemon)
来自服务器的所有其他消息都符合预期:
From: [email protected]
这导致中继 DKIM 签名出现问题,并且似乎不符合 RFC 5322。我对3.4和附录 A.5的阅读是,地址很可能应该是:
From: <[email protected]> (Cron Daemon)
但是,我可能误解了 RFC 并且还有其他一些问题。
这是当前配置,它几乎只是postfix
包创建的默认“卫星”配置:
postconf -n
:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = loopback-only
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = $myhostname, relayclient.example.com, localhost.example.com, localhost
myhostname = relayclient.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 192.0.2.85
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
cat /etc/aliases
:
# See man 5 aliases for format
postmaster: root
root: [email protected]
cat /etc/mailname
:
relayclient.example.com