diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2001-08-21 01:31:44 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2001-08-21 01:31:44 +0000 |
commit | 289b381b31415647269c7520d881017e2dcb27f1 (patch) | |
tree | 2cfd003f88c7ffe91602b6a6c0b69bee7b4d62db /contrib/sendmail/src/err.c | |
parent | 1164bba81c60839834c20d6e34983b4cfb9c05b4 (diff) | |
download | FreeBSD-src-289b381b31415647269c7520d881017e2dcb27f1.zip FreeBSD-src-289b381b31415647269c7520d881017e2dcb27f1.tar.gz |
Import sendmail 8.11.6
Diffstat (limited to 'contrib/sendmail/src/err.c')
-rw-r--r-- | contrib/sendmail/src/err.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/contrib/sendmail/src/err.c b/contrib/sendmail/src/err.c index 3f85c60..d259db2 100644 --- a/contrib/sendmail/src/err.c +++ b/contrib/sendmail/src/err.c @@ -12,7 +12,7 @@ */ #ifndef lint -static char id[] = "@(#)$Id: err.c,v 8.120.4.3 2001/05/30 00:22:26 gshapiro Exp $"; +static char id[] = "@(#)$Id: err.c,v 8.120.4.5 2001/08/17 22:09:40 ca Exp $"; #endif /* ! lint */ #include <sendmail.h> @@ -776,10 +776,27 @@ fmtmsg(eb, to, num, enhsc, eno, fmt, ap) spaceleft -= l; } - /* output the "to" person */ + /* + ** output the "to" address only if it is defined and one of the + ** following codes is used: + ** 050 internal notices, e.g., alias expansion + ** 250 Ok + ** 252 Cannot VRFY user, but will accept message and attempt delivery + ** 450 Requested mail action not taken: mailbox unavailable + ** 550 Requested action not taken: mailbox unavailable + ** 553 Requested action not taken: mailbox name not allowed + ** + ** Notice: this still isn't "the right thing", this code shouldn't + ** (indirectly) depend on CurEnv->e_to. + */ + if (to != NULL && to[0] != '\0' && - strncmp(num, "551", 3) != 0 && - strncmp(num, "251", 3) != 0) + (strncmp(num, "050", 3) == 0 || + strncmp(num, "250", 3) == 0 || + strncmp(num, "252", 3) == 0 || + strncmp(num, "450", 3) == 0 || + strncmp(num, "550", 3) == 0 || + strncmp(num, "553", 3) == 0)) { (void) snprintf(eb, spaceleft, "%s... ", shortenstring(to, MAXSHORTSTR)); |