Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Message-ID header to outgoing emails #16076

Merged
merged 3 commits into from
Apr 19, 2021

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Apr 19, 2021

Currently, we do not define any Message-ID, which means it gets generated by the mail gem as follows:

https://github.com/mikel/mail/blob/8fbb17d4d5364c77cc870769d451bc2739b3a8ce/lib/mail/utilities.rb#L325-L327

This PR changes that to specify our own domain part, by parsing SMTP_FROM_ADDRESS.

@ClearlyClaire
Copy link
Contributor Author

Changed to use the notifications@localhost default for consistency even if it doesn't make a whole lot of sense, and stop catching parse errors, as catching parsing errors at application startup is probably more useful than having mails mysteriously not delivered for that reason.

@Gargron Gargron merged commit 1efcbb9 into mastodon:main Apr 19, 2021
chrisguida pushed a commit to Start9Labs/mastodon that referenced this pull request Feb 26, 2022
* Add Message-ID header to outgoing emails

* Use email domain name from SMTP_FROM_ADDRESS, fallback on WEB_DOMAIN on failure

* Use notifications@localhost as fallback for SMTP_FROM_ADDRESS, do not catch parse errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants