Our sign-in codes went to Junk, and every check passed
Stagd signs people in with a code by email. People who review previews, such as designers, product managers and clients, often have no GitHub account, so the code is how they get in. It has one job: arrive within a minute, in the inbox. At a Gmail address it did. At a Microsoft 365 address it went to Junk, or didn't show up at all. This is how we found out why, and why the usual checklist wasn't…
Stagd was experiencing issues where sign-in codes were being marked as junk in Microsoft 365, even when passing SPF, DKIM, and DMARC checks. The problem stemmed from the fact that the codes were being sent through a shared IP address that carried a history of spam, causing Microsoft to flag them as spam. The domain was also new and did not have an MX record or proper SPF record, which further hurt its reputation.
After upgrading the sending domain to receive mail and enabling mail routing, the codes initially went from not arriving at all to landing in the junk folder. However, this was only a temporary solution as the codes continued to be marked as junk. Other factors such as not having a preheader, adding a reply-to address, and logging message IDs for each mail sent did not seem to make a difference.
Microsoft's decision to mark the emails as spam was based on the reputation of the sender, not the identity of the sender. The domain had no history and was on a shared IP that carried a history of spam, which affected its reputation. After implementing the fixes, the codes now reach the inbox at Microsoft 365. The most likely reason for the improvement was the changes made to the sending domain, but it may also take time for the reputation to be built.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to