Hi, I’m seeing an intermittent inbound email processing failure on a self-hosted site using mail-receiver.
What happened
Two separate inbound emails:
- were delivered to the correct Discourse address
- appear in
/admin/email/received - also appear in
/admin/email/rejected - show the generic rejection text: “There was an unrecognised error whilst processing your email and it wasn’t posted.”
At around the same time, logs showed ActiveRecord::Deadlocked.
Why I think this may be a bug
I compared the rejected emails with a later successful email of a very similar format:
- same sender pattern
- same Microsoft / Power Automate path
- same visible
To:shape - same SMTP envelope recipient to the Discourse address
So this does not look like a simple configuration issue with mail-receiver.
Evidence
For both rejected emails:
- they were separate deliveries with different
Message-IDs - they had different Postfix queue ids
- both were delivered
for <ppyem3.accomodation@discourse.domain.com>
I also observed ActiveRecord::Deadlocked in logs around the same period.
Hosting context
- self-hosted
- using
mail-receiver - small IONOS VPS
- 1 web worker configured
I realise the 1 web worker may just be background context rather than the cause, since this appears to be inbound email/background processing rather than web request handling.
If useful, I can provide:
- redacted headers for the 2 rejected emails
- redacted headers for a successful comparable email
- the deadlock log entry