Page MenuHomePhabricator

Hide the client IP address in the SMTP Received header for authenticated relay clients
Closed, ResolvedPublic

Description

Emails that are sent via authenticated relay to the foundation are flagged as SPF softfail by google. This is due to how we relay emails to google.

[1] smtp auth -> [2] mx1001.wikimedia.org -> [3] google

This flow produces the following header:

Received: from [104.131.61.189] (port=56008 helo=mbuki-mvuki) by mx1001.wikimedia.org with esmtpsa
  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <qualtrics@wikimedia.org>) id 1oXqAN-001aL2-OT for jhathaway@wikimedia.org; Mon, 12 Sep 2022 20:36:27 +0000

Even though the [2] hop is allowed to send as wikimedia.org gmail flags the mail as a SOFTFAIL because hop [1] is not allowed to send as wikimedia.org according to our SPF record.

To avoid the softfail we should hide the IP address when an email arrives via authenticated SMTP.

Event Timeline

Change 831625 had a related patch set uploaded (by JHathaway; author: JHathaway):

[operations/puppet@production] mail::mx: Modify the Received header

https://gerrit.wikimedia.org/r/831625

Change 831625 merged by JHathaway:

[operations/puppet@production] mail::mx: Modify the Received header

https://gerrit.wikimedia.org/r/831625

@jhathaway confirming it worked! Sent you a test email as well in case you're curious/want to have the record.

@jhathaway confirming it worked! Sent you a test email as well in case you're curious/want to have the record.

great, thanks for the confirmation

Change #1024734 had a related patch set uploaded (by JHathaway; author: JHathaway):

[operations/puppet@production] postfix: add sasl auth header

https://gerrit.wikimedia.org/r/1024734

Change #1024734 merged by JHathaway:

[operations/puppet@production] postfix: add sasl auth header

https://gerrit.wikimedia.org/r/1024734