From 5aae0a242211ed2f7a45507b7e57bc987debc431 Mon Sep 17 00:00:00 2001 From: SumiGovindaraju Date: Tue, 5 Mar 2019 17:27:39 -0800 Subject: [PATCH] Don't forward automatic replies to mailing list emails --- mail_message.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mail_message.go b/mail_message.go index 3094a9c..8a8d1b7 100644 --- a/mail_message.go +++ b/mail_message.go @@ -525,6 +525,11 @@ func (message *MailMessage) handleReplyForwarding() bool { return false } + if strings.Contains(strings.ToLower(message.subject), "automatic reply") { + // Do not forward automatic replies + return true + } + log.Printf("Decoded reply-to addresses: %v", replyAddresses) data := struct { From *mail.Address