2
0
forked from drew/smtprelay

Allow email field to be empty in allowedUsers file

In this case, it is not checked.
This commit is contained in:
Jonathon Reinhart
2021-02-08 23:58:45 -05:00
parent 9040a456cf
commit f33105f83c
3 changed files with 16 additions and 5 deletions

View File

@@ -44,7 +44,7 @@ func senderChecker(peer smtpd.Peer, addr string) error {
return smtpd.Error{Code: 451, Message: "Bad sender address"}
}
if strings.ToLower(addr) != strings.ToLower(email) {
if email != "" && strings.ToLower(addr) != strings.ToLower(email) {
return smtpd.Error{Code: 451, Message: "Bad sender address"}
}
}