設定 postfix 從子網路上的機器進行中繼

設定 postfix 從子網路上的機器進行中繼

我正在嘗試將 postfix 設定為中繼,用於我們網路內的一些古老設備,這些設備無法升級以使用當前的安全協定來發送電子郵件。

在這個階段,我只是嘗試使用 telnet 來證明訪問。

目前狀態是在執行 postfix 的機器上使用 telnet,使用 127.0.0.1,可以運作:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220-cogapp.com ESMTP Postfix
quit

但是從該機器使用其實際 IP 或從同一子網路上的另一台機器嘗試它會失敗:

Trying 192.168.1.14...
telnet: connect to address 192.168.1.14: Connection refused
telnet: Unable to connect to remote host

我不認為機器上的 25 連接埠有任何阻塞。我可以遠端登入其上的其他服務。

我知道相關的後綴配置當前設定如下:

inet_interfaces = all

mynetworks = 127.0.0.0/8,192.168.1.0/24
mynetworks_style = subnet

smtpd_recipient_restrictions = permit_mynetworks

smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination

我假設還有一些其他後綴配置參數需要更改。你能幫我看看這些是什麼嗎?

TIA - 帕特。

編輯 - 根據第一個回復中 anx 的建議更完整地轉儲配置:

$ postconf -n
biff = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
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
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mail_owner = _postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 10485760
myhostname = cogapp.com
mynetworks = 127.0.0.0/8,192.168.1.0/23
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
smtpd_recipient_restrictions = permit_mynetworks
smtpd_tls_ciphers = medium
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550

$ postconf -M
smtp       inet  n       -       n       -       1       postscreen
smtpd      pass  -       -       n       -       -       smtpd
dnsblog    unix  -       -       n       -       0       dnsblog
tlsproxy   unix  -       -       n       -       0       tlsproxy
submission inet  n       -       n       -       -       smtpd -o smtpd_tls_security_level=encrypt
smtp       unix  -       -       n       -       -       smtp
pickup     fifo  n       -       n       60      1       pickup -o content_filter=
cleanup    unix  n       -       n       -       0       cleanup
qmgr       fifo  n       -       n       300     1       qmgr
tlsmgr     unix  -       -       n       1000?   1       tlsmgr
rewrite    unix  -       -       n       -       -       trivial-rewrite
bounce     unix  -       -       n       -       0       bounce
defer      unix  -       -       n       -       0       bounce
trace      unix  -       -       n       -       0       bounce
verify     unix  -       -       n       -       1       verify
sacl-cache unix  -       -       n       -       1       sacl-cache
flush      unix  n       -       n       1000?   0       flush
proxymap   unix  -       -       n       -       -       proxymap
proxywrite unix  -       -       n       -       1       proxymap
relay      unix  -       -       n       -       -       smtp -o smtp_fallback_relay=
showq      unix  n       -       n       -       -       showq
error      unix  -       -       n       -       -       error
retry      unix  -       -       n       -       -       error
discard    unix  -       -       n       -       -       discard
local      unix  -       n       n       -       -       local
virtual    unix  -       n       n       -       -       virtual
lmtp       unix  -       -       n       -       -       lmtp
anvil      unix  -       -       n       -       1       anvil
scache     unix  -       -       n       -       1       scache
dovecot    unix  -       n       n       -       25      pipe flags=DRhu user=_dovecot:mail argv=/usr/libexec/dovecot/dovecot-lda -d ${user}
policy     unix  -       n       n       -       -       spawn user=nobody:mail argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl

相關內容