Postfix 无法连接到中继 SMTP 服务器

Postfix 无法连接到中继 SMTP 服务器

我们有一个 Debian 虚拟机,我想使用 postfix 和 mailutils 通过中继 SMTP 服务器发送电子邮件

尝试使用 telnet 连接到 SMTP 服务器。

telnet mail.sch.gr 587
Trying 194.63.239.110...
Connected to mail.sch.gr.
Escape character is '^]'.
220 mail26.sch.gr ESMTP Postfix (Debian/GNU)
AUTH LOGIN
334 VXNlcm5hbWU6
*************
334 UGFzc3dvcmQ6
*************
235 2.7.0 Authentication successful

但是,如果我尝试发送电子邮件,则不会发送,mail.log 显示

(SASL authentication failed; server mail.sch.gr[194.63.239.110] said: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6)

我的 main.cf 是这样的:

# 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 (Debian/GNU)
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

relayhost=[mail.sch.gr]:587
smtp_sasl_mechanism_filter = login
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls=yes

inet_protocols = ipv4

sasl_passwd 是这样的:

[mail.sch.gr]:587 [email protected]:password

(显然用户和密码被替换为实际的用户名和密码)

我不知道该如何继续...

相关内容