设为首页收藏本站

简体中文 繁體中文 English 日本語 Deutsch 한국 사람 بالعربية TÜRKÇE português คนไทย Français

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 53|回复: 4

使用postfix中继outlook报错

[复制链接]

11

主题

91

回帖

265

积分

中级会员

积分
265
发表于 2020-6-11 09:57:05 | 显示全部楼层 |阅读模式
本帖最后由 pengxp1996 于 2020-6-11 21:21 编辑

main.cf配置文件
[ol]
  • 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[/ol]复制代码

    账户密码配置文件/etc/postfix/sasl_passwd
    [ol]
  • smtp.office365.com:587 [email protected]:passwd[/ol]复制代码
    [ol]
  • 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=
  • Jun 11 09:53:45 gov postfix/qmgr[15468]: 770352007F3: from=, 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][/ol]复制代码

    懂的大佬快来看看?

    问题最终发生在微软smtp服务器拒绝身份验证,这一个安全策略,只需要为不支持多重验证的应用创建应用密码即可。
  • 回复

    使用道具 举报

    449

    主题

    4497

    回帖

    1万

    积分

    论坛元老

    积分
    10493
    发表于 2020-6-11 10:48:24 | 显示全部楼层
    把提交端口从587换成25看看有没有变化?
    回复

    使用道具 举报

    11

    主题

    91

    回帖

    265

    积分

    中级会员

    积分
    265
     楼主| 发表于 2020-6-11 10:59:11 | 显示全部楼层

    shc 发表于 2020-6-11 10:48

    把提交端口从587换成25看看有没有变化?

    outlook提供的smtp为smtp.office365.com:465
    没有开放多余端口
    回复

    使用道具 举报

    449

    主题

    4497

    回帖

    1万

    积分

    论坛元老

    积分
    10493
    发表于 2020-6-11 10:48:00 | 显示全部楼层

    pengxp1996 发表于 2020-6-11 10:59

    outlook提供的smtp为smtp.office365.com:465
    没有开放多余端口

    outlook客户端提交邮件确实只用465,但是你这个不是用的outlook客户端,只是向outlook服务器提交邮件,应该用587/25都可以吧,587验证不过可以试一下25端口提交
    回复

    使用道具 举报

    11

    主题

    91

    回帖

    265

    积分

    中级会员

    积分
    265
     楼主| 发表于 2020-6-11 11:04:01 | 显示全部楼层
    本帖最后由 pengxp1996 于 2020-6-11 14:58 编辑

    shc 发表于 2020-6-11 11:04

    outlook客户端提交邮件确实只用465,但是你这个不是用的outlook客户端,只是向outlook服务器提交邮件,应 ...


    我配置的就是587,一样的结果。25是关闭的。可能加密方式不一样:STARTTLS
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|Discuz! X

    GMT+8, 2026-4-1 23:54 , Processed in 0.015123 second(s), 3 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2025 Discuz! Team.

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