author | Alberto Bertogli
<albertito@blitiri.com.ar> 2025-10-02 09:45:26 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2025-10-02 09:45:26 UTC |
parent | eeb2deb7f608372ce20920a0dfd843162b2d191e |
internal/smtpsrv/conn.go | +4 | -5 |
diff --git a/internal/smtpsrv/conn.go b/internal/smtpsrv/conn.go index af90d82..8a67e42 100644 --- a/internal/smtpsrv/conn.go +++ b/internal/smtpsrv/conn.go @@ -747,11 +747,10 @@ func (c *Conn) addReceivedHeader() { // explicitly hide their network address. received += fmt.Sprintf("from %s\n", c.ehloDomain) } else { - // For non-authenticated users we show the real address as canonical, - // and then the given EHLO domain for convenience and - // troubleshooting. - received += fmt.Sprintf("from [%s] (%s)\n", - addrLiteral(c.remoteAddr), c.ehloDomain) + // For non-authenticated users we also include the network address, + // for convenience and troubleshooting. + received += fmt.Sprintf("from %s ([%s])\n", + c.ehloDomain, addrLiteral(c.remoteAddr)) } received += fmt.Sprintf("by %s (chasquid) ", c.hostname)