From 3115e574d714804e5c88fb25aa8de120c593c2bb Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 12 Dec 2024 11:57:10 +0100 Subject: [PATCH 1/2] Update lib.go: Changing `mailFromRE` regex --- server/smtpd/lib.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/smtpd/lib.go b/server/smtpd/lib.go index 0574c5055..3ef691538 100644 --- a/server/smtpd/lib.go +++ b/server/smtpd/lib.go @@ -28,7 +28,7 @@ var ( // Debug `true` enables verbose logging. Debug = false rcptToRE = regexp.MustCompile(`[Tt][Oo]:\s?<(.+)>`) - mailFromRE = regexp.MustCompile(`[Ff][Rr][Oo][Mm]:\s?<(.*)>(\s(.*))?`) // Delivery Status Notifications are sent with "MAIL FROM:<>" + mailFromRE = regexp.MustCompile(`[Ff][Rr][Oo][Mm]:\h?<([^>]*)>(\h(.*))?`) // Delivery Status Notifications are sent with "MAIL FROM:<>" mailSizeRE = regexp.MustCompile(`[Ss][Ii][Zz][Ee]=(\d+)`) ) From a52ff39ae3f24705e68dfd245bce7792b9f36b3c Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 12 Dec 2024 12:04:09 +0100 Subject: [PATCH 2/2] Update lib.go --- server/smtpd/lib.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/smtpd/lib.go b/server/smtpd/lib.go index 3ef691538..bc730ec75 100644 --- a/server/smtpd/lib.go +++ b/server/smtpd/lib.go @@ -28,7 +28,7 @@ var ( // Debug `true` enables verbose logging. Debug = false rcptToRE = regexp.MustCompile(`[Tt][Oo]:\s?<(.+)>`) - mailFromRE = regexp.MustCompile(`[Ff][Rr][Oo][Mm]:\h?<([^>]*)>(\h(.*))?`) // Delivery Status Notifications are sent with "MAIL FROM:<>" + mailFromRE = regexp.MustCompile(`[Ff][Rr][Oo][Mm]:\h?<([^>\v]*)>(\h(.*))?`) // Delivery Status Notifications are sent with "MAIL FROM:<>" mailSizeRE = regexp.MustCompile(`[Ss][Ii][Zz][Ee]=(\d+)`) )