我有一个系统,我们将其设置为邮件服务器,用于将进入该域的所有电子邮件转发到其他外部电子邮件地址。我一直在寻找,发现本教程我认为它是完美的,因为它完全实现了我想要的效果。
我遇到的问题是中继访问被拒绝当有人尝试发送域名电子邮件时。
/var/log/邮件日志
Oct 23 16:23:13 MXSERVER postfix/smtpd[2011]: connect from mail-io1-f48.google.com[209.85.166.48]
Oct 23 16:23:13 MXSERVER postfix/smtpd[2011]: NOQUEUE: reject: RCPT from mail-io1-f48.google.com[209.85.166.48]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-io1-f48.google.com>
Oct 23 16:23:13 MXSERVER postfix/smtpd[2011]: disconnect from mail-io1-f48.google.com[209.85.166.48]
/var/postfix/main.cf | grep -v“#”
(由于 main.cf 中有很多注释掉的行,我将它们删除以节省空间)
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.testdomain.org
mydomain = testdomain.org
myorigin = testdomain.org
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks = XXX.XXX.XXX.XXX/32, 127.0.0.0/8, localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
virtual_alias_domains = testdomain,org
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
/etc/postfix/虚拟
testdomain.org dest
[email protected] [email protected]
@testdomain.org [email protected]
答案1
virtual_alias_domains = testdomain,org
难道不应该吗testdomain.org
?