1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-08 17:51:57 +00:00

mda-lmtp: Handle "<>" addresses

Either the recipient or from addresses can be "<>" to indicate the null
address. mda-lmtp does not handle that well, as it sends "<<>>" which is
invalid.

This patch fixes that by special-casing them, which is unfortunate but
reasonably common.
This commit is contained in:
Alberto Bertogli
2017-08-08 09:12:53 +01:00
parent 6867859d5c
commit 0972964722
2 changed files with 39 additions and 0 deletions

View File

@@ -84,6 +84,13 @@ func main() {
tempExit("Could not get hostname: %v", err)
}
if *fromwhom == "<>" {
*fromwhom = ""
}
if *recipient == "<>" {
*recipient = ""
}
cmd(tc, 250, "LHLO %s", hostname)
cmd(tc, 250, "MAIL FROM:<%s>", *fromwhom)
cmd(tc, 250, "RCPT TO:<%s>", *recipient)