全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1000|回复: 4

[翻译] 使用postfix中继outlook报错

[复制链接]
发表于 2020-6-11 09:57:05 | 显示全部楼层 |阅读模式
本帖最后由 pengxp1996 于 2020-6-11 21:21 编辑

main.cf配置文件
  1. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
  2. myhostname = gov.996icu.com
  3. alias_maps = hash:/etc/aliases
  4. alias_database = hash:/etc/aliases
  5. myorigin = /etc/mailname
  6. mydestination = $myhostname, gov.996icu.com, localhost.wanvi.net, , localhost
  7. relayhost = smtp.office365.com:587
  8. mynetworks = 127.0.0.0/8 172.17.17.91/18  [::ffff:127.0.0.0]/104 [::1]/128
  9. mailbox_size_limit = 0
  10. recipient_delimiter = +
  11. inet_interfaces = loopback-only
  12. inet_protocols = ipv4

  13. smtp_sasl_auth_enable = yes
  14. smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  15. smtp_sasl_security_options = noanonymous
  16. smtp_tls_security_level = may
  17. header_size_limit = 4096000
复制代码


账户密码配置文件/etc/postfix/sasl_passwd
  1. smtp.office365.com:587 user@outlook.com:passwd
复制代码

  1. Jun 11 09:53:45 gov postfix/smtpd[15473]: connect from localhost[127.0.0.1]
  2. Jun 11 09:53:45 gov postfix/smtpd[15473]: 770352007F3: client=localhost[127.0.0.1]
  3. Jun 11 09:53:45 gov postfix/cleanup[15475]: 770352007F3: message-id=<bd47daaf5283c9bd576ad128dc529428@996icu.com>
  4. Jun 11 09:53:45 gov postfix/qmgr[15468]: 770352007F3: from=<pengxp1996@outlook.com>, size=655, nrcpt=1 (queue active)
  5. 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
  6. 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]
  7. 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]
  8. 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]
  9. 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服务器拒绝身份验证,这一个安全策略,只需要为不支持多重验证的应用创建应用密码即可。
发表于 2020-6-11 10:48:24 | 显示全部楼层
把提交端口从587换成25看看有没有变化?
 楼主| 发表于 2020-6-11 10:59:11 | 显示全部楼层
shc 发表于 2020-6-11 10:48
把提交端口从587换成25看看有没有变化?

outlook提供的smtp为smtp.office365.com:465
没有开放多余端口
发表于 2020-6-11 11:04:01 | 显示全部楼层
pengxp1996 发表于 2020-6-11 10:59
outlook提供的smtp为smtp.office365.com:465
没有开放多余端口

outlook客户端提交邮件确实只用465,但是你这个不是用的outlook客户端,只是向outlook服务器提交邮件,应该用587/25都可以吧,587验证不过可以试一下25端口提交
 楼主| 发表于 2020-6-11 14:50:46 | 显示全部楼层
本帖最后由 pengxp1996 于 2020-6-11 14:58 编辑
shc 发表于 2020-6-11 11:04
outlook客户端提交邮件确实只用465,但是你这个不是用的outlook客户端,只是向outlook服务器提交邮件,应 ...


我配置的就是587,一样的结果。25是关闭的。可能加密方式不一样:STARTTLS
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-26 23:04 , Processed in 0.059094 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表