我正在尝试使用后缀作为SMTP中继来发送出站电子邮件,但是当我尝试使用SMTP详细信息与电子邮件客户端进行连接时,当我在主配置文件中添加relayhost条目时,它也不会对SMTP用户进行身份验证,它将停止发送内部发送电子邮件,但是当我删除它时,一切都可以正常工作。
我已在master.cf文件中启用了提交端口。
telnet localhost 587
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 server1.mydomain.com ESMTP Postfix
我还通过遵循本文尝试了配置,但似乎没有任何作用。
https://www.linode.com/docs/email/postfix/postfix-smtp-debian7/
有什么主意我可以解决这个问题吗?
这是sasl_passwd配置文件
[server1.mydomain.com]:587 myuser:mypassword
我的main.cf文件
# specify SMTP relay host
relayhost = [server1.mydomain.com]:587
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_security_level = may
smtpd_tls_security_level = encrypt
smtpd_tls_auth_only = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/letsencrypt/live/server1.mydomain.com/privkey.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/server1.mydomain.com/fullchain.pem
smtpd_tls_dh1024_param_file = /etc/pki/tls/private/postfix.dh.param
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_cache
tls_random_source = dev:/dev/urandom
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2, !SSLv3
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtp_tls_protocols = !SSLv2, !SSLv3
smtp_tls_exclude_ciphers = EXP, MEDIUM, LOW, DES, 3DES, SSLv2
smtpd_tls_exclude_ciphers = EXP, MEDIUM, LOW, DES, 3DES, SSLv2
tls_high_cipherlist = kEECDH:+kEECDH+SHA:kEDH:+kEDH+SHA:+kEDH+CAMELLIA:kECDH:+kECDH+SHA:kRSA:+kRSA+SHA:+kRSA+CAMELLIA:!aNULL:!eNULL:!SSLv2:!RC4:!MD5:!DES:!EXP:!SEED:!IDEA:!3DES
tls_medium_cipherlist = kEECDH:+kEECDH+SHA:kEDH:+kEDH+SHA:+kEDH+CAMELLIA:kECDH:+kECDH+SHA:kRSA:+kRSA+SHA:+kRSA+CAMELLIA:!aNULL:!eNULL:!SSLv2:!MD5:!DES:!EXP:!SEED:!IDEA:!3DES
#Setting up SMTP authentication
smtp_tls_ciphers = high
smtpd_tls_ciphers = high
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable= yes
smtp_sasl_mechanism_filter = plain
#smtpd_sasl_security_options = noanonymous
# where to find sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
#Open DKIM settings
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
milter_default_action = accept
#relay accessdeniedproblem fix
smtp_tls_CApath = /etc/ssl/certs
smtpd_tls_CApath = /etc/ssl/certs
mime_header_checks = regexp:/etc/postfix/header_checks
header_checks = regexp:/etc/postfix/header_checks
在后缀日志中,它显示以下错误。
server1 postfix / submission / smtpd [4814]:警告:ec2-x-xx-xxx-xxx.compute-1.amazonaws.com [x.xx.xxx.xxx]:SASL登录身份验证失败:
Postfix服务器:CentOS 7