1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-10 18:05:57 +00:00

smtpsrv: Improve "Received" header standard compliance

Despite its loose appearance, the "Received" header has a reasonably
standarized format.

We were not following the standard format as closely as we should; this
rarely causes problems in this particular case, but there's no need to
deviate from it.

This patch changes the Received header generation as follows:

 - The "from" section now uses the remote address as canonical (for
   non-authenticated users) which provides more valuable information
   than the user-supplied EHLO address (which is also included).
 - The remote authenticated user is now hidden, for additional privacy.
 - Use the "with" optional clause.
 - Use the standard way of printing TLS cipher suite.
 - Use the standard way of printing address literals.
This commit is contained in:
Alberto Bertogli
2018-11-22 03:00:55 +00:00
parent 328008061d
commit 29709a0d58
3 changed files with 98 additions and 13 deletions

View File

@@ -20,10 +20,10 @@ Delivery to the following recipient(s) failed permanently:
----- Original message -----
Received: from localhost (authenticated as user@testserver)
by testserver (chasquid)
Received: from localhost
by testserver (chasquid) with ESMTPSA
tls *
(over *
(envelope from "user@testserver")
; *
Date: *
From: Mailer daemon <somewhere@horns.com>