Mail-receiver: Authentication-Results failure ignored

AI-generated summary

In this bug report, Dannii reports that the Discourse mail-receiver is ignoring Authentication-Results failures for incoming emails. Despite configuring the email_in_authserv_id setting to match the server’s identity, a spoofed email addressed to and from the forum’s support address was accepted as a Private Message (PM). The provided headers show a clear DMARC failure (dmarc=fail) and no SPF pass, yet the message was processed. Dannii initially suspected that the existence of a staged account associated with the spoofed address might be causing the authentication check to be bypassed.

Dannii later noted that unrelated AMEX spam also exhibited similar authentication failures (DMARC fail, SPF Softfail) but was presumably processed, suggesting the issue might be a general failure of the authentication logic rather than an edge case involving staged accounts. To mitigate the spoofed support emails, Dannii attempted to block the support@ email address. However, this resulted in a flood of rejection notification emails from the forum, which were deemed more annoying than the original spam, forcing the block to be removed.

The discussion highlights the difficulty in detecting and rejecting self-spoofed emails sent to and from the same address. Dannii questions whether the email_in_authserv_id configuration is correct—having copied the value leaflet-mail-receiver.localdomain from the headers—and seeks confirmation from other users on whether this setting has been successfully implemented for spam prevention in their environments.

I’m using the mail-receiver, and I recently configured the email_in_authserv_id setting with my forum’s processor.

I’m not sure if it’s hasn’t been working at all, but an email has just come through that should have been caught. Specifically, it is an email addressed to my forum’s support@ address (which goes to a PM for the admins), spoofed to be from that same address. Maybe because there is an existing staged account for that address the authentication-results is ignored?

Here are the top of the email headers as shown from within Discourse itself:

Authentication-Results: leaflet-mail-receiver.localdomain; dmarc=fail (p=none dis=none) header.from=intfiction.org
Authentication-Results: leaflet-mail-receiver.localdomain; dkim=none;
	dkim-atps=neutral
Received-SPF: None (mailfrom) identity=mailfrom; client-ip=**********; helo=intfiction.org; envelope-from=support@intfiction.org; receiver=intfiction.org 
Received: from intfiction.org (unknown [*************])
	by leaflet-mail-receiver.localdomain (Postfix) with ESMTP id B62F1120746
	for <support@intfiction.org>; Thu,  5 Nov 2026 11:53:25 +0000 (UTC)
From: Postmaster <support@intfiction.org>
To: support@intfiction.org
Subject: =?UTF-8?B?8J+TqSBJbmNvbWluZyBNZXNzYWdlcyBGYWlsdXJl?=
Date: 5 Nov 2026 03:53:24 -0800

My Discourse version: 2026.7.4.

I’m going to remove the staged user’s support@ email, which is currently a secondary email, as it shouldn’t ever be sending emails from that address (noreply@ is the email it actually sends from). Maybe that will help going forward.

I had some AMEX spam, so I’m wondering if it’s got nothing to do with there being an existing staged account, and it’s just not working?

Authentication-Results: leaflet-mail-receiver.localdomain; dmarc=fail (p=none dis=none) header.from=sent.com
Authentication-Results: leaflet-mail-receiver.localdomain; dkim=none;
	dkim-atps=neutral
Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=**********; helo=sent.com; envelope-from=donotreplyus_support@sent.com; receiver=intfiction.org

I blocked my forum’s support@ email… and now I just get blocked address rejection emails from the forum. So I’ll have to unblock it, because those emails are somehow even more annoying than the original spam emails were!

Spoofed emails sent to and from support@ should be the easiest things to detect and reject. And it looks like the mail-receiver is doing its part of it?

Does anyone have any experience with successfully setting email_in_authserv_id? Could I have put the wrong value in somehow? (I just copied leaflet-mail-receiver.localdomain from these email headers.)