Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: OpenERP sends emails from addresses it does not own.

by
manuel
- 10/24/2014 14:08:47
Le 24/10/14 12:00, Manuel Vázquez a écrit :
<blockquote cite="mid:544A779F.7070608@merchise.org" type="cite">How to fix this behavior could be very tricky to get right, but I think this is bad enough to fix it in 7.0.  I haven't been able to recreate this in 8.0
I have confirmed this behavior in 8.0 as well:


Here's the local postfix (annotated) conversation:

The other@example.com user replies to a message admin sent to him and yadenis@example.com:

postfix/qmgr[22992]: EF658A147E: from=<other@example.com>, size=1066, nrcpt=1 (queue active)
postfix/smtpd[24269]: disconnect from localhost[127.0.0.1]
postfix/pipe[24288]: 84385A1049: to=<catchall@o8.example.com>, relay=odoo, delay=0.73, delays=0.11/0/0/0.62, dsn=2.0.0, status=sent (delivered via odoo service)
postfix/qmgr[22992]: 84385A1049: removed

Up to this point this simply says it was delivered via the odoo (relay).   This "relay" simply the mailgate script.


Now OpenERP connects to postfix to send notifications:

postfix/smtpd[24269]: EF658A147E: client=localhost[127.0.0.1]
postfix/cleanup[24287]: EF658A147E: message-id=<544A93AD.5030600@example.com>
postfix/qmgr[22992]: EF658A147E: from=<other@example.com>, size=1066, nrcpt=1 (queue active)
postfix/smtpd[24269]: disconnect from localhost[127.0.0.1]
postfix/pipe[24288]: 84385A1049: to=<catchall@o8.example.com>, relay=odoo, delay=0.73, delays=0.11/0/0/0.62, dsn=2.0.0, status=sent (delivered via odoo service)
postfix/qmgr[22992]: 84385A1049: removed
dovecot: lda(manu@example.com): msgid=<544A93AD.5030600@example.com>: saved mail to INBOX
postfix/pipe[24300]: EF658A147E: to=<yadenis@example.com>, relay=dovecot, delay=0.48, delays=0.15/0.01/0/0.32, dsn=2.0.0, status=sent (delivered via dovecot service)
postfix/qmgr[22992]: EF658A147E: removed


Notice the from is other@example.com, whereas the OpenERP has o8.example.com domain.... (actually I could place any other domain here as long as I configure both my Postfix and OpenERP to accept it).  Also notice that is delivered to yadenis@example.com via dovecot (drop it in a local catch-all mailbox accesible via IMAP to tests things)...


This was done with odoo branch 8.0 at commit 83b4742b566bacec9912d51ae69b27d9490ccb98...