不确定我哪里做错了。
我已经配置了 postfix,以便它效果很好做的时候:
- 将电子邮件从外部来源中继/重定向到用户的虚拟邮箱(例如,他们的 Gmail 帐户)
- 将电子邮件从内部来源(例如,服务器警报)发送到外部邮箱(例如,我的个人电子邮件)
但它失败的正在做:
将内部来源的电子邮件(前面提到的服务器警报)发送到用户的虚拟邮箱。
我收到如下错误:
Jan 08 03:21:16 hermes postfix/qmgr[153]: CDBB11BC1A1F: from=<[email protected]>, size=1012, nrcpt=1 (queue active)
Jan 08 03:21:16 hermes postfix/virtual[5307]: CDB4C1BC165E: to=<[email protected]>, relay=virtual, delay=25790, delays=25790/0/0/0, dsn=4.3.5, status=deferred (mail system configuration error)
[email protected]
通过虚拟表中继/重定向到我的个人邮箱。
关于我应该从哪里进行故障排除,有什么指示吗?
编辑1:这是我的main.cf
:
maillog_file = /dev/stdout
smtp_helo_name = hermes
myorigin = localhost
myhostname = hermes.mycompany.com
mydestination = noreply.dto.kemkes.go.id
mydomain = noreply.mycompany.com
smtpd_banner = $myhostname ESMTP
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 2
smtpd_tls_session_cache_database = lmdb:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = lmdb:${data_directory}/smtp_scache
smtpd_tls_chain_files =
${config_directory}/star_mycompany_com.pem
smtpd_tls_security_level = may
transport_maps =
sqlite:/etc/postfix/transport-sqlite.cf
# Don't accept mail from domains that don't exist.
smtpd_sender_restrictions =
check_sender_access sqlite:/etc/postfix/sender-sqlite.cf
reject_unknown_sender_domain
smtpd_relay_restrictions =
permit_sasl_authenticated
reject_unauth_destination
# Consult database on how to 'canonicalize' sender address.
# If database lookup fails, consult the milter. (In our case, is postsrsd)
# Refs:
# - https://github.com/roehling/postsrsd
# - https://serverfault.com/a/780367/15440
sender_canonical_maps = sqlite:/etc/postfix/canonical-sqlite.cf, tcp:127.0.0.1:10001
sender_canonical_classes = envelope_sender
# For receiving emails
smtpd_recipient_restrictions =
permit_sasl_authenticated
check_recipient_access sqlite:/etc/postfix/recipients-sqlite.cf
permit_auth_destination
virtual_mailbox_domains = mycompany.com
virtual_mailbox_maps = sqlite:/etc/postfix/virtual-sqlite.cf
virtual_mailbox_base = /var/mail
virtual_alias_maps = sqlite:/etc/postfix/alias-sqlite.cf
# alias_maps = lmdb:/etc/aliases
# alias_database = lmdb:/etc/aliases
relayhost =
mynetworks = 127.0.0.0/8 192.168.0.0/16
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
smtpd_tls_auth_only = no
smtp_use_tls = no
smtpd_use_tls = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
# DKIM
milter_default_action = accept
milter_protocol = 2
smtpd_milters = unix:/run/opendkim/opendkim.sock
postscreen_upstream_proxy_protocol = haproxy