From: Robert Sesek Date: Sat, 8 Aug 2020 15:48:57 +0000 (-0400) Subject: Log when a send-as occurs. X-Git-Tag: v2.0.1~7 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=9a8143454e0c7049a666210836fd555dcf11ae29;p=mailpopbox.git Log when a send-as occurs. --- diff --git a/smtp/conn.go b/smtp/conn.go index 8093945..30a6359 100644 --- a/smtp/conn.go +++ b/smtp/conn.go @@ -489,6 +489,8 @@ func (conn *connection) handleSendAs(env *Envelope) { sendAsUser := headers[subjectIdx][sendAs[2]:sendAs[3]] sendAsAddress := string(sendAsUser) + "@" + DomainForAddressString(conn.authc) + conn.log.Info("handling send-as", zap.String("address", sendAsAddress)) + for i, header := range headers { if i == subjectIdx { buf.Write(header[:sendAs[0]])