如何将 Postfix 传出端口设置为 465,但将传入端口保持为默认值?

Ale*_*lex 5 postfix port

我的 ISP 阻止了端口 25。因此,我无法连接到我的服务器并发送电子邮件。我试过把它改成 465。它有效!但是,在此更改后,我无法再接收电子邮件。

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
465 inet  n       -       -       -       -       smtpd
#smtp      inet  n       -       -       -       1       postscreen
#smtpd     pass  -       -       -       -       -       smtpd
#dnsblog   unix  -       -       -       -       0       dnsblog
#tlsproxy  unix  -       -       -       -       0       tlsproxy
submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
#smtps     inet  n       -       -       -       -       smtpd
#  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=no
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
Run Code Online (Sandbox Code Playgroud)

以上是我master465改后的文件。(注意第一行)。

此更改后,我无法再接收电子邮件。请帮忙!谢谢!

b13*_*n1u 6

您不会收到任何邮件,因为 SMTP 服务器在端口 25 上相互发送邮件。ISP 会阻止外发端口 25 以阻止垃圾邮件,这现在几乎是“行业标准”。端口 465 和 587 应仅用于客户端 - 服务器连接,因此 99% 将向您的服务器发送邮件的 SMTP 服务器将在端口 25 上执行此操作。当您将端口从 25 更改为 465 时,它们不会能够连接到您的服务器。

您很可能需要某种中继主机,它将邮件转发到不同端口上的服务器。