我目前正在尝试弄清楚如何在 Red Hat 6 中配置 sendmail.postfix 以与 Exchange 2010 中继一起使用。我已经配置了我们的交换服务器以允许我们的网络服务器进行中继。执行此操作的命令是什么?
答案1
要使用 postfix 中继功能,请修改您的/etc/postfix/main.cf
文件以包含以下配置:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
mydomain = domain.com
myorigin = $myhostname
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
relayhost = exchange2010.domain.com
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.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
需要修改以适应您的本地设置的关键部分是:
mydomain = domain.com
将其设置为您的本地域。
myorigin = $myhostname
如果您希望邮件源自客户端的主机名。
relayhost = exchange2010.domain.com
这是FQDN
您的交换服务器的。
然后重新加载/重新启动您的 postfix 服务:
service postfix reload / restart