Infinite loop of: 'Email issue -- Unknown To: Address' emails


(Rogelio J. Samour) #1

Maybe not quite an infinite loop but I’m having trouble tracking down the core issue here. We’re up to almost 200K emails of just this type in the last few days. That could get expensive. :-/

Right now I’ve had to disable all outbound emails from Discourse.

I’ve traced it back to the PollMailbox job: discourse/poll_mailbox.rb at master · discourse/discourse · GitHub

But I need a clue as to how to trace back further down the stack. I realize there’s a timer that runs this poll every SiteSetting.pop3_polling_period_mins.minutes but how can I clear the queue per se?

Any help would be appreciated.

Related topics: Creating topics by email to users.rust-lang.org or internals.rust-lang.org fails with 'Email Issue: Unknown To: Address' and Creating topics by email to users.rust-lang.org or internals.rust-lang.org fails with 'Email Issue: Unknown To: Address'


Getting email every 5 minutes that says "Email issue --Unknown To: Address"
(Kane York) #2

Can you post logs of the incoming mailbox that Discourse looks at to poll for email-in?


(Travis) #3

It’s gmail, what logs can I post to help? ( @therubymug and I admin the same forum)


(Kane York) #4

To, stripped From and CC addresses of the first few email before the loop started.


(Rogelio J. Samour) #5

I’m pasting a sample email. It’s thousands before and after. It looks like it’s attempting to email itself.

Does that give you a better clue as to what may be going on?

Our reply by email address: is reply+%{reply_key}@strats.co

Right now we’ve turned set: reply by email enabled to unchecked

Delivered-To: support@strats.co
From: <support@strats.co>
Subject: Email issue -- Unknown To: Address
Return-Path: <bounce-md_30190395.54c9c929.v1-18add8dfdf61458995484ef03caaf5e8@track.strats.co>
X-Discourse-Topic-Id: 
X-Discourse-Post-Id: 
X-Discourse-Reply-Key: 
Reply-To: <support@strats.co>
To: <support@strats.co>
Message-Id: <54c9c9297f55f_16e93fc7bfa5c21c33960275@daggerfall.strats.co-app.mail>
Auto-Submitted: auto-generated
Received: from [<redacted ip>] by mandrillapp.com id 18add8dfdf61458995484ef03caaf5e8; Thu, 29 Jan 2015 05:46:17 +0000
X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com
X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30190395.18add8dfdf61458995484ef03caaf5e8
X-Mandrill-User: md_30190395
Date: Thu, 29 Jan 2015 05:46:17 +0000

--_av-HFxtra1FlAEZjjWqa2XfEw
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

We're sorry, but your email message to ["support@strats.co"] (titled Email issue -- Unknown To: Address) didn't work.

None of the destination addresses are recognized. Please make sure that the site address is in the To: line (not Cc: or Bcc:), and that you are sending to the correct email address provided by staff.


--_av-HFxtra1FlAEZjjWqa2XfEw
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<p>We're sorry, but your email message to ["support@strats.co"] (titled Email issue -- Unknown To: Address) didn't work.</p>

<p>None of the destination addresses are recognized. Please make sure that the site address is in the To: line (not Cc: or Bcc:), and that you are sending to the correct email address provided by staff.</p>
<img src="http://track.strats.co/track/open.php?u=30190395&id=18add8dfdf61458995484ef03caaf5e8" height="1" width="1">
--_av-HFxtra1FlAEZjjWqa2XfEw--

(Kane York) #6

No, I mean the first one that ISN’T identical to that. The one that started the chain.


(Rogelio J. Samour) #7

@riking Ha! Yeah, it’s like the needle in the haystack. There are over 200K emails identical to that one spanning multiple days. :-/ This one’s a doozy. Is there any log file in the server I could look at?


(Kane York) #8

Hm, how about this: Set up a gmail filter rule to trash any email sent from that same address. That’ll make sure it never happens.


(Jeff Atwood) #9

Thanks to @zogstrip we now test for and block setting these email addresses in a way that causes feedback loops.


(Jeff Atwood) #10