我正在尝试将 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 端口被阻塞。我可以通过 telnet 连接到该机器上的其他服务。
据我所知,相关的后缀配置当前设置如下:
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
我估计还有一些其他的 postfix 配置参数需要更改。你能帮我找出是哪些吗?
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