This question has been flagged
4 Replies
3902 Views

Hello forum!

I have a very weird problem. It is about e-mail settings. I managed to make the outgoing SMTP server settings work very well. I can send e-mails through one account that I created as gateway. The problem exists with my incoming mail settings. I figured that you have to make separate e-mail settings for each of the users I created.

I created incoming IMAP mail settings for my account, and it passes nicely, it says testing ok, and fetching e-mail doesn't give any errors. But when I go to messaging tab of the account that is supposed to receive e-mails, I get nothing.

"I must have missed something, and my connection to outside world might be wrong?" Say no more, I went right ahead and tried POP incoming settings. Works like a charm. But I don't want POP settings. It doesn't suite my needs at all.


I am hereby humbly asking someone to help me debug this. Why is POP working and IMAP not? I should also mention,  that I have configured IMAP settings at my thunderbird client and it works flawlessly, so we can rule out server side problems.


On a sidenote, I am missing a send message button in my messaging tab, so the way I tested outgoing settings was to reply some of the messages that I received while POP settings were active.



Avatar
Discard

Could it be that your email server has not been setup for IMAP? For example, if you use Gmail, you can sign in your account and go to Settings / Forwarding and POP/IMAP. I think by default POP is enabled,and IMAP is disabled.

Author

I should also mention, that I have configured IMAP settings at my thunderbird client and it works flawlessly, so we can rule out server side problems.

Best Answer

Hi

Something that you may not appreciate, Odoo will only 'capture' mails if they are unread. Therefore this might account for the odd behaviour .. ie when you're testing the emails get parsed about once an hour, but if its a real user account you are using, then you are probably letting them get read. Then you go to bed, leave your emails, get up next day and the emails that were received overnight that have not been looked at are unread and have had ample opportunity to be parsed and brought into Odoo, as expected..

Really the only way to get Odoo and mails to work really nicely is I think with an unmonitored mailbox, which makes sense for support or sales perhaps. But how does it work for your own inbox? You will of course have mails that are then read and not picked up.  But this is surely how its supposed to work for your Inbox in Odoo, I am still working out quite how this is supposed to really function ...

For the best read up on how the mail works read this from Olivier Dony

https://www.odoo.com/forum/help-1/question/how-to-trigger-an-email-on-project-issue-changes-35894

It's a year or two old, and describes projects as well as CRM, but its very detailed, and from the best source possible;-)

Hope this helps, the info is a bit think on the mail gateway


Avatar
Discard
Author Best Answer

Can it be that the machine odoo is running on is blocking the IMAP traffic?

I am running ubuntu server, with no firewall. But I did configure postfix and dovecot for experimenting (not odoo related, just same machine), could they be the culprits? 


EDIT: The problem fixed itself somehow. I had to let the settings "sit over night". Then I saw my emails in my odoo inbox.



EDIT 2: It didn't fix by itself. I have problems using timezones. They are causing this nonsense. It appears odoo is sending request to server in UTC time zone, but apparently my server where mail is running is in +2 with respect to UTC, meaning those mails never arrived at my Odoo server side. I am trying to fix this now.


EDIT 3: FINALLY I FOUND WHAT WAS THE PROBLEM.


NOTE TO ALL OTHERS WHO MIGHT HAVE A PROBLEM WITH THIS:


The IMAP protocol on Odoo is configured to use Search (Unseen) query to mail server. So if you read your mail somewhere else, Odoo will NOT download that mail to Odoo server. You will not receive it. So either don't read mail anywhere else, or modify the IMAP protocol query as I intend to do.


I did not see the answer below. I used wireshark to figure out what was the problem. The full answer is below. Thank you Julian for your in-depth answer, I will try to figure out how I will access mails.

Avatar
Discard

I think my post was after you used wireshark, but before you posted most recently.