Technical mailing list archives

OpenERP sends emails from addresses it does not own.

- 10/23/2014 17:49:24
Hi all,

I need some suggestion about an issue that may be either a misconfiguration, or bug.

Summary:  OpenERP sends emails with the SMTP envelop with address it does not own (ie. MAIL_FROM


1. Assume you have openerp with local domain for emails

2. Some of your users use the messages system intensively to communicate with external parties.

3. OpenERP delivers email via SMTP to a local postfix that relays to the enterprise MTA.  In turn, this MTA relays to this local postfix when receives message To addresses  The MTA owns the domain

4. The local postfix delivers email to OpenERP via the mailgate script.

Steps to reproduce the issue:

1. The user sasha sends a message to, and  OpenERP connects with local postfix to send the email to those external addresses.  Postfix then relays to the enterprise's MTA...  A few minutes later Bob, Alice and Chris receive the email.

2. Bob replies...  His MTA connects with ours, which then relays to the local postfix, the postfix delivers the email to OpenERP via the mailgate script.

3. OpenERP checks the thread-id and then send notifications to both and But doing so it identifies as, ie. it sends a "MAIL_FROM" in the SMTP envelop.

So both Alice and Chris would receive emails from Bob but which were not sent by the MTA that owns If Alice's or Chris' MTAs verify the origin, the email will be rejected.  Furthermore, spam watch lists might blacklist our MTA cause it could be deemed to send spam.

Any ideas?

Best regards,