|
本帖最后由 pengxp1996 于 2020-6-11 21:21 编辑
main.cf配置文件
- smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
- myhostname = gov.996icu.com
- alias_maps = hash:/etc/aliases
- alias_database = hash:/etc/aliases
- myorigin = /etc/mailname
- mydestination = $myhostname, gov.996icu.com, localhost.wanvi.net, , localhost
- relayhost = smtp.office365.com:587
- mynetworks = 127.0.0.0/8 172.17.17.91/18 [::ffff:127.0.0.0]/104 [::1]/128
- mailbox_size_limit = 0
- recipient_delimiter = +
- inet_interfaces = loopback-only
- inet_protocols = ipv4
- smtp_sasl_auth_enable = yes
- smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
- smtp_sasl_security_options = noanonymous
- smtp_tls_security_level = may
- header_size_limit = 4096000
复制代码
账户密码配置文件/etc/postfix/sasl_passwd
- Jun 11 09:53:45 gov postfix/smtpd[15473]: connect from localhost[127.0.0.1]
- Jun 11 09:53:45 gov postfix/smtpd[15473]: 770352007F3: client=localhost[127.0.0.1]
- Jun 11 09:53:45 gov postfix/cleanup[15475]: 770352007F3: message-id=<[email protected]>
- Jun 11 09:53:45 gov postfix/qmgr[15468]: 770352007F3: from=<[email protected]>, size=655, nrcpt=1 (queue active)
- Jun 11 09:53:45 gov postfix/smtpd[15473]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
- Jun 11 09:53:49 gov postfix/smtp[15470]: 088E32007EC: SASL authentication failed; server smtp.office365.com[40.100.54.2] said: 535 5.7.3 Authentication unsuccessful [HK2PR0302CA0009.apcprd03.prod.outlook.com]
- Jun 11 09:53:51 gov postfix/smtp[15476]: 770352007F3: SASL authentication failed; server smtp.office365.com[40.100.54.242] said: 535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com]
- Jun 11 09:53:56 gov postfix/smtp[15470]: 088E32007EC: SASL authentication failed; server smtp.office365.com[40.100.2.98] said: 535 5.7.3 Authentication unsuccessful [HK2PR02CA0200.apcprd02.prod.outlook.com]
- Jun 11 09:53:59 gov postfix/smtp[15476]: 770352007F3: SASL authentication failed; server smtp.office365.com[52.98.85.194] said: 535 5.7.3 Authentication unsuccessful [HK2PR06CA0023.apcprd06.prod.outlook.com]
复制代码
懂的大佬快来看看?
问题最终发生在微软smtp服务器拒绝身份验证,这一个安全策略,只需要为不支持多重验证的应用创建应用密码即可。 |
|