1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

Handle space after "MAIL FROM:" for Outlook SMTP

This commit is contained in:
James Hillyerd
2013-09-13 09:01:36 -07:00
parent edd65ff415
commit f50061ac82

View File

@@ -212,7 +212,7 @@ func (ss *Session) greetHandler(cmd string, arg string) {
func (ss *Session) readyHandler(cmd string, arg string) {
if cmd == "MAIL" {
// (?i) makes the regex case insensitive
re := regexp.MustCompile("(?i)^FROM:<([^>]+)>( [\\w= ]+)?$")
re := regexp.MustCompile("(?i)^FROM:\\s*<([^>]+)>( [\\w= ]+)?$")
m := re.FindStringSubmatch(arg)
if m == nil {
ss.send("501 Was expecting MAIL arg syntax of FROM:<address>")