Postfix 无法正确转发电子邮件

Postfix 无法正确转发电子邮件

我正在尝试让我的 Postfix 邮件服务器转发发送至[电子邮件保护][电子邮件保护]。我按照我找到的说明进行操作这里

当我发送消息给[电子邮件保护],我在我的邮件服务器上收到了电子邮件,但邮件没有被转发到[电子邮件保护]。我的 /etc/postfix/virtual 文件如下所示:

[email protected] [email protected], [email protected]

(我的目标是将消息转发给[电子邮件保护][电子邮件保护]所以我知道这封电子邮件是否已经发送完毕。

知道为什么该邮件没有转发到我的 GMail 帐户吗?(并且,它不在我的垃圾邮件文件夹中。)

如果有帮助的话,下面是我的 /etc/postfix/main.cf 和 /var/log/mail.log 的尾部。

主文件:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.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

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = woollymammothlabs.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = woollymammothlabs.com, li173-195.members.linode.com, localhost.members.linode.com, localhost
virtual_alias_domains = woollymammothlabs.com
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost = 
mynetworks = 127.0.0.0/8
mailbox_command = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

邮件日志:

Sep  8 16:08:59 localhost postfix/cleanup[10385]: 7AA672AB44: message-id=<[email protected]>
Sep  8 16:08:59 localhost postfix/qmgr[10377]: 7AA672AB44: from=<[email protected]>, size=2324, nrcpt=2 (queue active)
Sep  8 16:08:59 localhost postfix/trivial-rewrite[10384]: warning: do not list domain woollymammothlabs.com in BOTH mydestination and virtual_alias_domains
Sep  8 16:08:59 localhost postfix/local[10386]: 7AA672AB44: to=<[email protected]>, relay=local, delay=0.08, delays=0.07/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Sep  8 16:09:00 localhost postfix/smtp[10387]: 7AA672AB44: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.65.27]:25, delay=1.3, delays=0.07/0.01/0.02/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1283962140 d1si13779076ybi.21)
Sep  8 16:09:00 localhost postfix/qmgr[10377]: 7AA672AB44: removed
Sep  8 16:09:29 localhost postfix/smtpd[10380]: disconnect from mail-vw0-f47.google.com[209.85.212.47]
Sep  8 16:12:49 localhost postfix/anvil[10383]: statistics: max connection rate 1/60s for (smtp:209.85.212.47) at Sep  8 16:08:59
Sep  8 16:12:49 localhost postfix/anvil[10383]: statistics: max connection count 1 for (smtp:209.85.212.47) at Sep  8 16:08:59
Sep  8 16:12:49 localhost postfix/anvil[10383]: statistics: max cache size 1 at Sep  8 16:08:59

答案1

Jason - 我遇到了和你一样的问题。我可以推荐这个 Postfix 指南这对我来说一切都清楚了。我实际上清除了旧的 Postfix 安装,并按照这些说明重新安装。在它建议您创建的地址文件中,只需将本地用户名替换为要转发的电子邮件地址即可。

至于测试,请使用第三方电子邮件地址(不属于重定向/中继配置的地址)进行测试。当我从我的 Google 帐户测试时,邮件失败,但当我通过 Yahoo 发送时,邮件始终可以送达。

相关内容