When using POP server, a mail delivered to unknown/undefined alias makes fetchmail fail and stop parsing all emails.

Bug #1104091 reported by rizzopablo
86
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 1

Bug Description

Fetchmail reads emails from server, parse it, identify corresponding aliases and make the corresponding action (save to user inbox, publish to group, etc) An email sent to an unknown recipient should be ignored or processed in other way.

This works as described when using IMAP server.

Using a POP server, if fetchmail reads an email from queue and can not identify a corresponding alias, it stops reading further emails.

Using latest Openerp 7 from trunk.

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Pabriz,

I have read your bug report, but could not understand it properly.
So would you please elaborate more on this better If you can provide the proper use case for this.

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
electro (electro1) wrote :

Hi,

I think the problem is that the inbox contains email addressed to different alias tha expected. In this case fetcmail throws...
Do you are using a fetchall email account ?

May be is same as my question:
https://answers.launchpad.net/openobject-addons/+question/229779

Revision history for this message
rizzopablo (rizzopablo) wrote :

No, this is not the case. There is a diferent behavior when fetching from imap or pop, the first one is correct, while pop is not.

Revision history for this message
electro (electro1) wrote :

Hello Pabriz,
that's partially true.

I think the POP/IMAP fetchmail steps are as below:
- Each N minutes
- OpenERP fetches only new messages from the inbox.
- If a new message is found, fetchmail will read it (the email will be marked as read)
- Internal routing try to make the corresponding action,
- if a valid alias is found, openerp routing make the action and go to read next new message
- if it's an unknown recipient, routing trhow an exception and stop to working

When you are using IMAP, the unknown message is "as read" than on 2nd fetchmail runs, the unknown message will be ignored and fetchmail will read next message in your inbox....this is an unexpected workaround

Difference between POP and IMAP is because
When you are using POP, OpenERP consider as new messages all messages found in the inbox.

When you are using IMAP OpenERP consider as new messages only unread messages the inbox.

did you check your log file for some info about fetchmail error ?

A question is still open: 'how to manage" unknown messages ?

regads

Revision history for this message
rizzopablo (rizzopablo) wrote :

Dear Electroshock, please, do not guess, read the code and read my first post:

"Using a POP server, if fetchmail reads an email from queue and can not identify a corresponding alias, it stops reading further emails."

It should read the remaining emails in the inbox, like it does when using imap. Just because one email doesn't match, that does not mean the others wouldn't too.

That's the bug.

Best regards.

Pablo

Revision history for this message
electro (electro1) wrote :

Dear Pabriz,
I'm agree with you it's a bug :-) but I think is same bug both for IMAP and POP.

You can't see the bug with IMAP because it happens an un-expected workaround. (thanks to the invalid email isn't "new" on 2nd fetching)

If you have 11 emails where first 10 are dummies emails you have to fetch 11 times (and throwing 10times) before get the 11th valid mail in openerp.
Check the logfile

cheers

electro (electro1)
Changed in openobject-addons:
status: Incomplete → Confirmed
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello pabriz & electro (electroshok) ,

I have checked this issue with latest trunk as well as with 7.0. And I am facing same issue with POP mail server. So, I am confirming this issue.

Thank you.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Medium
Revision history for this message
electro (electro1) wrote :

Is there some updates on this issue ?

Revision history for this message
Michael Karrer (michaelkarrer81) wrote :

I am also very interested if any update / workaround is available - I do want to import an inbox with 600+ messages and it will take forever because of a lot of "not aliased" mails ...

Revision history for this message
PkLab.net (pklab) wrote :

Hi,
I've same problem too... and I'm surprised that after 8 months there is no solution neither answer.

Has "social network" features lowest priority in openerp development ?

cheers

Revision history for this message
开阖软件 Jeff Wang (jeff.osbzr.com) wrote :

I linked my email account as a incoming mail server in my OpenERP, when launchpad send community maillist mail to me, the fetch mail raise exception, because the receiver is not my mail, cann't match the alias in openerp. then All email cann't been process from that time.

This is very important issue because any fetch mail server will crash only when it got a mail from a maillist.

Revision history for this message
开阖软件 Jeff Wang (jeff.osbzr.com) wrote :

Sorry I read the log and found fetch mail continue read next mails, so this unmatch only a assert exception

Revision history for this message
PkLab.net (pklab) wrote :

Hi jeff.osbzr
openerp will continue with next mail only if your account is IMAP, in case account is POP openerp will try to read always same message, without success.

In addiction the wrong addressed email will remain in "read" status on server and this will be a mistake when you will read it from other mail client or webmail

rgds

tags: added: maintenance
Revision history for this message
Peter Langenberg (peter-langenberg) wrote :

Testscenario :

0) create a <email address hidden> address
1) create johndoe database in openerp.
2) create an fetchmail account to get the mail from <email address hidden> with pop
3) create a partner janedoe with emailaddress <email address hidden>
4) send an email from <email address hidden> to <email address hidden> and cc support@johndoe in cc: (<email address hidden> is NOT a partner in the johndoe database)
5) send an email from <email address hidden> to <email address hidden>

The second mail does not arrive in the openerp database as stated in :

https://bugs.launchpad.net/openobject-addons/+bug/1104091/comments/5
"Using a POP server, if fetchmail reads an email from queue and can not identify a corresponding alias, it stops reading further emails.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.