Several emails sent from my webserver to a Gmail address, where the
From: address is
firstname.lastname@example.org, have been marked as spam by Gmail. The
From: field is populated from form data, and corresponds to the visitor's actual email address, which often is a Gmail address. The
Return-Path: is always pointing to an address
email@example.com, which means that SPF and DKIM checks will work.
When I inspect the raw emails in the Gmail account, I see the following:
Delivered-To: firstname.lastname@example.org ... Return-Path: <email@example.com> Received: from mywebserver.com (mywebserver.com. [my:ipv6:address]) by mx.google.com with ESMTPS id xxx for <firstname.lastname@example.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 00:40:02 -0800 (PST) Received-SPF: pass (google.com: domain of email@example.com designates my:ipv6:address as permitted sender) client-ip=xxx; Authentication-Results: mx.google.com; spf=pass (google.com: domain of firstname.lastname@example.org designates my:ipv6:address as permitted sender) email@example.com; dkim=pass firstname.lastname@example.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mywebserver.com; s=mydkim; h=Date:Message-Id:Sender:From:Subject:To; bh=w2snQznwxlVRVACmfQELC7VGmD1dcYdiCXbCIRYFKRs=; b=a0Vy3Ky43J5FdiWSuQ4qvTTH47G+Js0W/qtRU5gMlxfesNqrlyaIyExaIZlWvHNL4o0LNOF1GI94w4C41mmH+2JIkMEQZazw0MainP7UyUgsm/RZbAWoRuecPv+k108FlsWMP/l1UttXAdlvBVJmV2UGsYYlSSjKErQEF8tv3K0=; Received: from apache by mywebserver.com with local (Exim 4.80) (envelope-from <email@example.com>) id 1aQWVF-00009b-2X for firstname.lastname@example.org; Tue, 02 Feb 2016 09:40:01 +0100 To: email@example.com From: Website User <firstname.lastname@example.org> Sender: email@example.com ...
Note that both the SPF and DKIM checks are passing, but the DMARC check is not. After some searching, I tracked this down to DMARC using the
From: address to get its reference domain from, according to this answer on stack overflow.
- Is it likely that indeed the
dmarc=failis the cause of the email being assigned to spam by Gmail?
- Why does DMARC operate on the
From:address, rather than the
Return-Path(envelope sender) as SPF and DKIM do?
- If now also the
From:header has to correspond to an address
@mydomain.comthen how should we specify the actual (logical, flesh and blood) sender of the message?