force reply-to list address because of defective android mail clients

This commit is contained in:
gutmet 2019-05-26 19:37:33 +02:00
parent 09cfd89dd7
commit 72a148b4a9

View File

@ -101,13 +101,15 @@ func isAllowed(mail *mail.Message, f flags, owners hashset) (bool, error) {
}
func setHeaderFields(mail *mail.Message, listname string, f flags) {
sender := f.returnPath()
bounceAddress := []string{"<" + f.returnPath() + ">"}
listAddress := []string{"<" + listname + ">"}
mail.Header["Precedence"] = []string{"list"}
mail.Header["Sender"] = []string{"<" + sender + ">"}
mail.Header["Errors-To"] = []string{sender}
mail.Header["List-Id"] = []string{"<" + listname + ">"}
mail.Header["Sender"] = bounceAddress
mail.Header["Errors-To"] = bounceAddress
mail.Header["List-Id"] = listAddress
if !f.newsletter {
mail.Header["List-Post"] = []string{"<mailto:" + listname + ">"}
mail.Header["Reply-To"] = listAddress
}
}