Prevent creation of staged user for emails with auto-xyz header

(Christoph) #1

Continuing the discussion from Google "no-reply" user pending approval:

I am using Gmail for my incoming emails (following this guide). When I recently signed into that Gmail account from a new device, Google sent me one of those security warning emails: “got a new device? Review sign-in from Samsung Galaxy S7”. Discourse correctly rejected this email with an Email::Receiver::AutoGeneratedEmailError but it nevertheless created a staged user for Can/should this not be avoided, given that discourse correctly noticed that

the ‘precedence’ header is set to: list, junk, bulk or auto_reply, or when any other header contains: auto-submitted, auto-replied or auto-generated.

(David Taylor) #2

See my question here:

(Christoph) #3

Thanks. I’m not sure this is exactly the same though. The rejection error you mention is email_reject_bad_destination_address, right? But mine is Email::Receiver::AutoGeneratedEmailError. So this is not about bouncing or spam, as far as I understand.

Here is a more visual representation of what I’m looking at:

(Jeff Atwood) #4

Not sure; what do you think @zogstrip?

(Régis Hanol) #5

Unfortunately, that header isn’t 100% junk. I’d say we’ve had a handful customers send emails in with that header set… Hence the “block auto generated emails” site setting.

Creating staged users for these emails was the reason we detected we were “losing” some emails.

(Christoph) #6

I’m not sure I’m following. My point was merely that if an email is blocked (because it is autogenerated or for any other reason, for that matter) then it doesn’t really make sense to create a staged user for it, no?

(Tobias Eigen) #7

Did anything ever happen with this?

(Gerhard Schlager) #9

I fixed this last week: FIX: don't create staged users when incoming email is rejected · discourse/discourse@76706f9 · GitHub

(Gerhard Schlager) #10

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.