我刚刚使用 postfix 和 dovecot 设置了一个邮件服务器,现在我在使用evolution
.
例如,当我向 发送电子邮件时[email protected]
,出现错误:
NOQUEUE: reject: RCPT from unknown[MY_IP_ADDRESS]: 450 4.3.2 <[email protected]>:
Recipient address rejected: Try again later; from=<contact@XX>
to=<[email protected]> proto=ESMTP helo=<[IP_ADDRESS]>
我用谷歌搜索了一下,问题似乎是:
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
我可以将我当前的 IP 地址添加到mynetworks
,并且它有效。但是如果我从其他位置使用它怎么办?所以我需要这个在任何地方都能工作。
然后我尝试设置smtpd_relay_restrictions
为空值,并smtpd
抱怨
postfix/smtpd[16217]: fatal: in parameter smtpd_relay_restrictions or
smtpd_recipient_restrictions, specify at least one working instance of:
reject_unauth_destination, defer_unauth_destination, reject, defer, defer_if_permit or check_relay_domains
我真的不知道我现在应该做什么,如果我添加0.0.0.0/0
或类似的东西mynetworks
会成为问题吗? (也许成为垃圾邮件服务器?)
PS 我正在 Ubuntu 14.04 上运行 postfix 2.11
后配置-n
#
# I replaced the ip address of my VPS to "VPS_IP"
# MYDOMAIN.com for my email domain
#
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
mydestination = MYDOMAIN.com, localhost.vpsserver.com, localhost
myhostname = MYDOMAIN.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 VPS_IP
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_sasl_authenticated
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_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
virtual_alias_maps = hash:/etc/postfix/virtual