I’m trying to use https://emailit.com/ on a forum that’s been up for 7 years or so (currently using mailgun). Email It is refusing to send because
530 From header does not match MAIL FROM address
When I look at the email source on messages sent through Mailgun, I see that there is a "Sender: " line like “Sender: admin=example.com@www.example.com”. I don’t see this line on other test messages on other forums.
If I remove all plugins, the problem persists.
If I wipe the database, the problem goes away.
When I restore the database, the problem comes back.
I’ve tried searching custom texts and settings. I’ve done a postgres query of all fields in the database looking for “admin=www” and a couple of other things (at least AI said it did, and it seemed credible).
I tried adding a put to see what message was getting passed to the thing that sends email (it was yesterday and I forgot the names of the classes). I haven’t seen an explanation there.
I’m stumped.
Any ideas on where to check next will be appreciated.
The Sender: is something different. The error you’re getting indicates a discrepancy between the “envelope” (RFC821 From address) and the “From:” header (RFC822)
I suspect that emailit (or maybe Discourse, we’ve been rolling our own mail servers for too long) is setting the envelope sender to the email address you’re authenticating with.
I think (!) you should make sure that notification_email and DISCOURSE_SMTP_USER_NAME are the same for emailit.
I was afraid of that. I’m much less familiar with RFC822 than I was 30 years ago. I know that "From " and "From: " and "Sender: " are all things, but not much more than that anymore.
Maybe this will be the year that I do that. Email seemed much easier when I had to port Sendmail and UUCP to linux than it does now.
Seemed promising. No joy. Interestingly, emailit says that the SMTP_USER_NAME should be “emailit”.
But again, the SMTP stuff (including notification_emai) in app.yml worked just fine on this very same server with an empty database and stops when the database is restored.