Odoo邮件发送失败问题解析

QQ邮箱发送问题

开源ERP Odoo邮件发送失败问题解析

图片来源:开源智造-OSCG.CN

Odoo SMTP服务器设置为QQ邮箱,邮件发送失败:

邮件投递失败
通过SMTP发送邮件失败 'smtp.qq.com'.
SMTPSenderRefused: 501
mail from address must be same as authorization user
help@odoo.com

同样的Odoo环境,换成263收费邮箱,或者腾讯企业收费邮箱,发送正常。什么原因呢?

据查,邮件发送的SMTP协议中,有From、Sender两个角色,From是发件人的邮箱,Sender是登录SMTP服务器的邮箱(用户名)。如下面这个邮件源码所示,From是Eric <xxbregister@oscg.cn>,Sender是zhiyunerp@oscg.cn 。QQ,163的大部分免费邮箱要求From和Sender必须是同一个邮箱(免费的Sender只能发送自己的邮件,不允许你替别人发送邮件)。

开源ERP Odoo邮件发送失败问题解析

图片来源:开源智造-OSCG.CN

这里有一个Odoo模块修复这个问题具体访问:http://www.oscg.cn进行获取

开源ERP Odoo邮件发送失败问题解析

图片来源:开源智造-OSCG.CN

但该模块有个问题,它强行将From邮箱改成Sender邮箱。安装这个模块后,邮件是可以发了,但收件方看不见是哪个人发的邮件(看到的永远是Sender)。

Received: from regular1.263xmail.com (unknown [211.150.99.137])
by newmx122.qq.com (NewMx) with SMTP id
for <1417063315@qq.com>; Wed, 06 Sep 2017 14:43:47 +0800
X-QQ-FEAT: XoWZfUq5xBiAOYE+f9elKHiL3EZd0BysoInWqkGmLoKzqmbt0VO1z3GiloVj/
3x2w0rT9V//aXsHqCLOEulibEiyGX5vi9V3D3TGryLVD/YB9gIa1eJ/KpsRZ4Sh/YgRVKke
Z4zYRJ64qvmnf/AcM6s7K+H84pZpIB+K8D/kPxrFMG0N3WnCtawMFcmdDQGPXFZ+jzSqluZ
IidgTWFP+08qwBSKKB6kI5//RBNg7mUdKoM9Y4soiK8IKraSfC5Tp9B+N/+7RuPaSUQW0Ml
zGJkLHPOfiq5+uMXY8A01mZkSFHYGkXye4OTEs6SCrPByH
X-QQ-MAILINFO: MjJD59SVx+LnpahJ/YkD10sHfxPylywKC4VgikUdysvFQfDfdXqa5XU1g
+pZ404WJVdgONm8E/9a8OBfgQvWtXq3hQ4a/Ng0o5cjwbpVZAeeiOjY6kApTDyfCoj5K55W
7BDXz03WSKakGUuH4ANQ0OQpSh2N68+kJqLFkTPlfwTN78IZDXh+nLrPuaJJIPsmwU2cTAo
XCOrWiv4oulCWCSawETEJMeEiRA==
X-QQ-mid: mx122t1504680228tvkb7gokk
X-QQ-CSender: zhiyunerp@oscg.cn
X-QQ-ORGSender: zhiyunerp@oscg.cn
Received: from zhiyunerp?oscg.cn (unknown [192.168.167.223])
by regular1.263xmail.com (Postfix) with ESMTP id B0B6ADC18
for <1417063315@qq.com>; Wed, 6 Sep 2017 14:43:45 +0800 (CST)
X-263anti-spam:KSV:0;BIG:0;
X-MAIL-GRAY:0
X-MAIL-DELIVERY:1
X-KSVirus-check:0
X-ADDR-CHECKED4:1
X-ABS-CHECKED:1
X-SKE-CHECKED:1
X-ANTISPAM-LEVEL:2
Received: from [10.135.44.76] (localhost [127.0.0.1])
by smtp.263.net (Postfix) with ESMTPA id 27FF2387
for <1417063315@qq.com>; Wed, 6 Sep 2017 14:43:47 +0800 (CST)
X-RL-SENDER:zhiyunerp@oscg.cn
X-FST-TO:1417063315@qq.com
X-SENDER-IP:121.40.25.211
X-LOGIN-NAME:zhiyunerp@oscg.cn
X-UNIQUE-TAG:<2e636ef7884cdddb91ee683884804a5b>
X-ATTACHMENT-NUM:0
X-SENDER:zhiyunerp@oscg.cn
X-DNS-TYPE:0
Received: from [10.135.44.76] (unknown [121.40.25.211])
by smtp.263.net (Postfix) whith ESMTP id 10414HMAUIN;
Wed, 06 Sep 2017 14:43:47 +0800 (CST)
Content-Type: multipart/mixed; boundary="===============2517494064163456641=="
MIME-Version: 1.0
Message-Id: <1504680163.243335962295532.144336769420180-openerp-541-forum.post@AY121208092731aaa6969>
references: <1504668623.234128952026367.605368542210408-openerp-541-forum.post@AY121208092731aaa6969>
Subject: =?utf-8?b?5Zue5aSNOiDmiafooYzliKDpmaTmk43kvZzml7bvvIzpg73miafooYzkuoY=?=
=?utf-8?b?5ZOq5Lqb5pON5L2c77yf?=
From: Eric <xxbregister@oscg.cn>
Reply-To: =?utf-8?b?6YCg5rqQ5L+h5oGv56eR5oqAKOS4iua1tynmnInpmZDlhazlj7g=?=
<zhiyunerp@oscg.cn>
To: =?utf-8?b?6IKW55u45om2?= <1417063315@qq.com>
Date: Wed, 06 Sep 2017 06:43:46 -0000

文章编辑:开源智造(OSCG.CN) - 源自欧洲,业界领先的免费开源ERP专业服务商

Odoo邮件发送失败问题解析
Odoo中文网
28 七月, 2020
存档
免费开源ERP Odoo层次数据结构处理原理