首页 > 解决方案 > 带有后缀的phpmailer中的SMTP Connect()

问题描述

尝试发送phpmailer返回此错误的电子邮件:

2019-09-09 16:48:39 服务器-> 客户端:220 primarydomain.mx ESMTP 后缀(Ubuntu) 2019-09-09 16:48:39 客户端-> 服务器:EHLO www.subdomain.mx 2019-09-09 16:48:39 服务器-> 客户端:250-primarydomain.mx 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH 普通登录 250-AUTH=PLAIN 登录 250-ENHANCEDSTATUSCODES 250-8BITMIME 2 DSN 250 SMTPUTF8 2019-09-09 16:48:39 客户端 -> 服务器:STARTTLS 2019-09-09 16:48:39 服务器 -> 客户端:220 2.0.0 准备启动 TLS 2019-09-09 16:48 :39 错误 SMTP:无法连接服务器 SMTP。2019-09-09 16:48:39 客户端 -> 服务器:退出 2019-09-09 16:48:39 服务器 -> 客户端:f5�|�+x�]?�M캅<������ ��9J����!��D(��"�n�6�m�� ��C��G0�O�vjdK@��&�z�����VŔ��"��� ����!C�Qf�yE-��M�YWrp8Dʕ������\N<��L�8�LsE�WZ�M�=��1c�@�=6�h,” $��rμ#��D����t�"��O�[�%�� ���^�p���E��Y�8,��P쓞C B�Sd��:84؃$<����|E:�_��nR��iO��e��7듣6��Ρ�(��N�,����P;���]f���{SS���"��<��� 2019-09-09 16:48:39 SMTP ERROR: QUIT command failed: f5�|�+x�]?�M캅&lt;�������9J���!��D(��"�n�6�m�� ��C��G0�O�vjdK@��&�z�����VŔ��"����� �!C�Qf�yE-��M�YWrp8Dʕ������\N<���L�8�LsE�WZ�M�=��1c�@�=6�h,�$��rμ#��D����t�"f���ʹ٢3��y��:Z�&gt;&�u�?��O�[�%������^�p���E��Y�8,��P쓞C B�Sd��:84؃$<����|E:�_�� nR��iO��e��7듣6��P�(��N�,����P;����]f���{SS����"��<���� 2019- 09-09 16:48:39 SMTP Connect() falló. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP Connect() falló. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

这是我的postix全局设置,有帮助吗?

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = primarydomain.mx
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, primarydomain.mx, localhost.mx, , localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = may
allow_percent_hack = no

PD:我可以毫无问题地使用我的电子邮件ThunderbirdOutlook客户,这只是在我尝试使用phpmailer发送电子邮件时发生的。

标签: phpphpmailerpostfix-mtawebmin

解决方案


推荐阅读