In a support thread titled āEmail in stopped working⦠halp ā, user mcwumbly reported that incoming emails to their Discourse instance ceased appearing in the forum, despite being successfully archived in the connected Gmail account. Initial troubleshooting revealed no changes to the system, and standard logs at /admin/email/received, /admin/email/rejected, and /logs showed no activity or errors. User codinghorror and pfaffman suggested checking for email forwarding issues. mcwumbly clarified that emails were sent directly and noted that enabling the log_mail_processing_failures site setting did not reveal the cause of intermittent failures. The issue was resolved when mcwumbly discovered that a separate āstagingā site, created for migration testing, had inadvertently retained POP3 polling enabled. This staging instance was consuming the incoming emails before the production server could process them. The user confirmed the emails were visible on the staging instanceās admin tabs and proceeded to disable polling there to restore functionality.
The gmail inbox weāre using for email in is still being polled successfully.
It is set up to āarchive emailsā after they are accessed via POP, and indeed, the emails in were getting archived.
No, this is just me sending emails directly to the account⦠and I can see that the emails are being accessed (since they are being archived).
Looking into this more and hereās some more info:
I logged in and grepped through the logs in rails/production.log, but didnāt see anything.
I tailed that file and sent 4 more emails. 3 of them worked, but 1 did not. I copied and pasted the subject and body of the failing one to a new email and that worked. So it does not seem to be content related.
Iām looking in lib/email/processor.rb and it seems like failures should be logged via the log_email_process_failure method in most cases.
But I see now that there is a log_mail_processing_failures site setting which is disabled by default.
Turning that on now and sending more mails to see if a new failure shows up in any logsā¦
Update: got one more failure, but still donāt see anything in any logsā¦
Dāoh, I found the problemā¦
I set up a āstagingā site a few weeks ago to test another migration. I restored a backup there and made notes to turn off certain settings (like outgoing email). But I did not turn of the POP3 polling there for incoming email.
Sure enough, I see all the āmissingā emails listed there on the āreceivedā and ārejectedā email tabs.
I will go ahead and turn off the polling there (and update my notes)