Eliminating Email Loops in Odoo With Smarter Address Handling for Automated Replies

Email loops

Email automation is essential for modern business workflows—but not all systems behave as expected. In real-world scenarios, many third-party services (such as AP automation platforms) process emails and send responses from a different address than the one originally contacted. While this may seem harmless, it can create serious issues inside Odoo. Steersman has developed a new enhancement to intelligently handle these scenarios—preventing email loops, reducing noise, and improving communication accuracy.

The Problem: When Email Automation Breaks the Chain

Consider a common workflow:

  • An invoice is sent from Odoo to ap@company.com
  • That email is automatically forwarded to a processing service (e.g., service@automation.com)
  • The service processes the invoice and replies back from its own address

At this point, Odoo correctly routes the reply using email headers and attaches it to the appropriate record. However, a hidden issue begins to emerge.

Because the reply now comes from a different email address, Odoo treats it as a new participant and adds it to the list of followers. The notification about the original response & future notifications then includes both:

  • The original recipient (ap@company.com)
  • The automated service (service@automation.com)

This can trigger a loop:

  1. Odoo sends an update to all followers
  2. The original recipient forwards it again to the automation service
  3. The service replies again
  4. Odoo logs the reply and notifies followers again

…And the cycle continues.

These loops can quickly lead to:

  • A disproportionate amount of processing power being used for sending and receiving emails
  • Odoo’s chatter panel could become very slow, and whatever record it’s attached to (invoice, SO, etc.) may become very slow to open.
  • Risk of hitting sending limits from the ESP and being unable to send and receive legitimate emails.
  • Some remote ESP may see this loop as spamming or bounce source and block the sender (Odoo), which will affect the deliverability of real emails
  • Confusion around who is actually sending the email
  • Inbox clutter for both users and customers, increasing the chances of missing meaningful communication.

The Solution: Intelligent Email Address Mapping

Steersman’s new enhancement introduces a flexible system to normalize and control email addresses during processing. This feature allows Odoo to automatically replace specific email addresses with a defined alternative—before the system processes or sends messages.

How It Works

When an incoming email is received:

  • The system evaluates the sender’s address
  • If it matches a defined rule, it is automatically replaced
  • The message is then processed using the corrected address

In the earlier example:

  • service@automation.com is automatically replaced with ap@company.com
  • Odoo treats the reply as coming from the original recipient
  • The automation service is no longer added as a follower
  • The loop is prevented entirely

This happens seamlessly and early in the email processing flow, ensuring consistent behavior across the system.

To learn how to configure your own Email Mappings, Click Here