sendmail: avoid sending mail to wrong addresses
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 24 Feb 2013 22:45:06 +0000 (00:45 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 18 Mar 2013 17:45:13 +0000 (18:45 +0100)
commit14285d14a5826eb172e02cf2f6f1ec096add01b0
treec40eb0c4810455b84bd9035444e16f89a4486862
parent7c6f2d4207e11ca60964132deb3bd1c4cb583aba
sendmail: avoid sending mail to wrong addresses

If we get an address we cannot parse properly, we currently just strip
the unknown characters and still try to send it. This is considered
harmful as the resulting address may still be valid but different from
what the user originally intended.

Instead, skip sending to an address we cannot fully understand and
print the characters what we have scanned so far. Leading and trailing
whitespace is allowed and silently stripped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
mailutils/sendmail.c