我正在尝试在本地测试 VM 上设置邮件中继服务器。我正在使用 Ubuntu 18.04。
当我使用我的 postfix 配置发送电子邮件时,邮件从未收到,我在邮件日志中看到此条目:
status=sent (delivered to command: procmail -a "$EXTENSION")
这是我的后缀配置:
tdunphy@tdunphy-dev:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, company.com, tdunphy-VirtualBox, localhost.localdomain, localhost
myhostname = noreply.company.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = smtpout.us.companyworld.company.com
smtp_sasl_auth_enable = no
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
我正在使用此命令在命令行上发送电子邮件:
mail -s "Test Subject" [email protected] < mail_test.txt
这是我在日志中看到的:
Jul 9 14:31:22 tdunphy-VirtualBox postfix/local[7906]: 1C485E36C: to=<[email protected]>, relay=local, delay=35, delays=35/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Jul 9 14:31:22 tdunphy-VirtualBox postfix/qmgr[7890]: 1C485E36C: removed
Jul 9 14:31:25 tdunphy-VirtualBox postfix/smtpd[7901]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 unknown=0/1 commands=5/6
但是电子邮件永远不会到达。我该如何解决?
你
mydestination
有company.com
它。因此,所有发送到*@company.com
的邮件都在本地处理 (relay=local
),而不是发送到 中指定的服务器relayhost
。