我在使用 postfix 时遇到了大问题。我可以在 webmin 和 outlook 中接收邮件,但无法发送邮件(只能在本地发送 - 用户对用户)。Dovecot 运行正常。Sendmail 已禁用。请帮助我。
postfix -n
postfix: invalid option -- n
postfix: fatal: usage: postfix [-c config_dir] [-Dv] command
[root@xprivatecams usr]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailbox_command =
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = acceptsmtpd_tls_auth_only = no
milter_protocol = 2
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = xprivatecams.com
mynetworks = 94.177.41.0/24, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:20207
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_milters = inet:localhost:20207
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
Jan 18 00:46:17 xprivatecams postfix/postfix-script: starting the Postfix mail system
Jan 18 00:46:17 xprivatecams postfix/master[15545]: daemon started -- version 2.3.3, configuration /etc/postfix
Jan 18 00:48:00 xprivatecams postfix/pickup[15546]: EDE7EA8001B: uid=0 from=<[email protected]>
Jan 18 00:48:00 xprivatecams postfix/cleanup[15817]: EDE7EA8001B: message-id=<[email protected]>
Jan 18 00:48:00 xprivatecams opendkim[2776]: EDE7EA8001B: DKIM-Signature header added
Jan 18 00:48:01 xprivatecams postfix/qmgr[15547]: EDE7EA8001B: from=<[email protected]>, size=615, nrcpt=1 (queue active)
Jan 18 00:48:31 xprivatecams postfix/smtp[15820]: connect to mail.flabell.com[72.47.224.75]: Connection timed out (port 25)
Jan 18 00:48:31 xprivatecams postfix/smtp[15820]: EDE7EA8001B: to=<[email protected]>, relay=none, delay=30, delays=0.08/0.03/30/0, dsn=4.4.1, status=deferred (connect to mail.flabell.com[72.47.224.75]: Connection timed out)
telnet 94.177.41.70 25
Trying 94.177.41.70...
Connected to xprivatecams.com (94.177.41.70).
Escape character is '^]'.
220 xprivatecams.com ESMTP Postfix
ehlo me
250-xprivatecams.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
答案1
1 月 18 日 00:48:31 xprivatecams postfix/smtp[15820]: 连接到 mail.flabell.com[72.47.224.75]: 连接超时 (端口 25)
Postfix 无法连接到目标邮件服务器。
这意味着您的邮件服务器和他们的邮件服务器之间的路径上的某些东西阻止了此流量,或者邮件服务器实际上没有监听端口 25。
由于我可以通过 telnet 顺利地连接到它,因此您的流量已被阻止。
有关详细信息,请联系你的 ISP。
答案2
您的提供商是否阻止了到端口 25 的传出 TCP?此行很可疑:
Jan 18 00:48:31 xprivatecams postfix/smtp[15820]: connect to mail.flabell.com[72.47.224.75]: Connection timed out (port 25)
如果您安装了 tcptraceroute,则“tcptraceroute mail.flabell.com 25”的输出可能会有用。
答案3
您的配置似乎没问题,我还认为存在端口过滤问题。例如,如果您尝试“telnet smtp.free.fr 25”,会得到什么结果?