Postfix

如何配置 sendmail.postfix 在 Exchange 2010 上中繼?

  • June 3, 2015

我目前正在嘗試弄清楚如何在 Red Hat 6 中配置 sendmail.postfix 以與 Exchange 2010 中繼一起使用。我已經配置了我們的交換伺服器以允許我們的網路伺服器進行中繼。這樣做的命令是什麼?

要使用後綴中繼功能,請修改您的/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您的交換伺服器。

然後重新載入/重新啟動您的後綴服務:

service postfix reload / restart

引用自:https://unix.stackexchange.com/questions/163104