Inactive users receiving email

AI-generated summary

In the discussion “Inactive users receiving email,” pfaffman reports an issue where inactive users are receiving email notifications despite their accounts not being activated. codinghorror requests clarification and pfaffman explains with an example, stating that the users are replying to the email notifications with their inactive email addresses, which Discourse is rejecting.

codinghorror believes that the issue may be due to database corruption after a recent import, as inactive users should not be able to receive emails in Discourse. riking suggests that the users may be replying from the wrong email address, but pfaffman has already checked and found that the unsubscribe link in the email notifications matches the users’ inactive email addresses.

codinghorror asks if the users have multiple accounts with multiple emails, suggesting that database corruption may be the cause of the issue, given the presence of other database-related problems.

On a big import, I see users who are getting mail rejected with “inactive” user. I’d assumed that they were forwarding mail from xx@y.com and replying from zzz@a.com, but that’s not the case. I can see in the message they reply to the unsubscribe link, and it is for their email address.

When I visit that user’s account, I see that the user is not activated.

I thought that inactive users could not receive mail. Is that wrong?

I can’t understand what you have written here. Can you explain with an actual example?

  • A user receives an email notification for a topic they are apparently watching.

  • User replies to the email notification.

  • Discourse rejects the email because the user is inactive-- Email::Receiver::InactiveUserError

I assumed that it was a user error, but I’ve seen at least a couple that seem to be cases of a user who is not active receiving mail.

Something must be borked with your database after the import, because that’s not possible in Discourse as far as I know.

If a user is inactive (that is, their email is not known to be working and validated) they can’t be mailed by definition.

Check if they’re accidentally replying from the wrong address?

That’s what I think too. Active is a field in the user table, so it doesn’t seem like an easy way for the database to be broken, though I just had an issue with two topics with the same id. Maybe this problem will go away after the recent restore and upgrade.

Yeah. That’s what I had assumed too, but I looked at the included text from their reply and it had an unsubscribe link with their inactive email address. Strange.

Does this user have multiple accounts with multiple emails?

Since you’ve implied the database is really screwed up here (two topics with the same id) plus your other “database is corrupt” topic, I’m going with that :wink: