Connect a shared mailbox to Odoo without marking it as read

When Odoo fetches a Gmail, Outlook or IMAP mailbox, it marks every email as read, even the ones it ignores. Fetchmail Keep Unread only marks as read the emails Odoo files on a document: newsletters and personal mail stay unread for those who read the mailbox elsewhere.

  • Free
  • Odoo 18 · 19 · 20
  • Community & Enterprise
  • Odoo.sh

A shared mailbox nobody can read any more

Odoo’s standard behaviour, every five minutes, on each incoming server.

Everything turns “read”

Newsletters, invitations, supplier invoices: everything is marked as read, even what Odoo filed nowhere.

The team loses track

The front desk or the volunteers reading info@ in their mail client no longer know what they have not seen yet.

The false good idea

Leaving ignored emails unread without further care: Odoo reads them again on every run, and in 19 and 20 recent replies get stuck behind them.

Why “leave it unread” is not enough

A mailbox that keeps 60 newsletters unread, with Odoo 19 and 20’s standard fetch (every 5 minutes, in batches of 50):

288fetches a day
14,400downloads a day without a marker
1download per email with the module
0newsletters marked as read

Calculated from Odoo’s code, not measured: the volume depends on your mailbox, the mechanism does not. Read the full article.

What Fetchmail Keep Unread does

One option per incoming server, without changing anything else in Odoo’s mail.

Read only if filed

An email is marked as read only if Odoo created or updated a record with it: reply to a quotation, new lead, ticket.

Each email examined once

Odoo remembers the last email examined (IMAP UID): an ignored email is never downloaded again, a recent reply never waits behind it.

Nothing else changes

The content is read without setting the “read” flag. Servers without the option keep Odoo’s standard behaviour.

Gmail incoming mail server form in Odoo with the Keep Unprocessed Emails Unread option switched on
The option on the incoming server form: one toggle, under the actions to perform on incoming mails.

One toggle, and that is it

  1. Install the module

    It only depends on Discuss (mail): Odoo 18, 19 and 20, Community and Enterprise alike.

  2. Open the incoming server

    Settings › Technical › Incoming Mail Servers (developer mode), or the “Incoming Email Servers” link in the general settings.

  3. Switch the option on

    From the next run, only filed emails are marked as read. The first run only examines the unread emails of the last two days.

Frequently asked questions

Gmail (OAuth), Outlook (OAuth) and any IMAP server. Not POP servers, which have no “read” flag: the option does not show there.
Odoo downloads each new email once to know whether it belongs to a document, as in standard. It simply no longer marks it as read, and never downloads it again.
On the first run, only the unread emails of the last two days are examined. Older ones stay as they are, unread.
It stays unread in the mailbox and the error is logged. It is not retried, and never blocks the next ones.
Nothing: the module is free, under the LGPL-3 licence, translated into French, Dutch, Spanish and German.

A shared mailbox to connect to Odoo?

Tell us who reads it and what should reach Odoo: we suggest the right setup.