From 9a8143454e0c7049a666210836fd555dcf11ae29 Mon Sep 17 00:00:00 2001
From: Robert Sesek <rsesek@bluestatic.org>
Date: Sat, 8 Aug 2020 11:48:57 -0400
Subject: [PATCH] Log when a send-as occurs.

---
 smtp/conn.go | 2 ++
 1 file changed, 2 insertions(+)

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]])
-- 
2.43.5