From 79ea883c42f82cecfe9b0da8b2fe452d17856b36 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Sat, 8 Aug 1981 22:04:46 -0800 Subject: [PATCH] implement blow-by-blow verbose mode SCCS-vsn: usr.sbin/sendmail/src/alias.c 3.5 SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.14 --- usr/src/usr.sbin/sendmail/src/alias.c | 8 +++++++- usr/src/usr.sbin/sendmail/src/deliver.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/alias.c b/usr/src/usr.sbin/sendmail/src/alias.c index 93915b0ec4..28b7dd4e8e 100644 --- a/usr/src/usr.sbin/sendmail/src/alias.c +++ b/usr/src/usr.sbin/sendmail/src/alias.c @@ -3,7 +3,7 @@ # include # include "sendmail.h" -static char SccsId[] = "@(#)alias.c 3.4 %G%"; +static char SccsId[] = "@(#)alias.c 3.5 %G%"; /* ** ALIAS -- Compute aliases. @@ -181,6 +181,8 @@ alias() q->q_paddr, q->q_host, q->q_user, p, al.q_paddr, al.q_host, al.q_user); # endif + if (Verbose) + message("050", "aliased to %s", p); q->q_flags |= QDONTSEND; didalias++; gotmatch++; @@ -200,6 +202,8 @@ alias() { for (q = Mailer[mno]->m_sendq; q != NULL; q = q->q_next) { + To = q->q_paddr; + /* don't realias already aliased names */ if (bitset(QDONTSEND, q->q_flags)) continue; @@ -230,6 +234,8 @@ alias() printf("%s (%s, %s) aliased to %s\n", q->q_paddr, q->q_host, q->q_user, p); # endif + if (Verbose) + message("050", "aliased to %s", p); q->q_flags |= QDONTSEND; sendto(p, 1); } diff --git a/usr/src/usr.sbin/sendmail/src/deliver.c b/usr/src/usr.sbin/sendmail/src/deliver.c index b9e759915a..06a457b879 100644 --- a/usr/src/usr.sbin/sendmail/src/deliver.c +++ b/usr/src/usr.sbin/sendmail/src/deliver.c @@ -7,7 +7,7 @@ # include # endif LOG -static char SccsId[] = "@(#)deliver.c 3.13 %G%"; +static char SccsId[] = "@(#)deliver.c 3.14 %G%"; /* ** DELIVER -- Deliver a message to a particular address. @@ -445,7 +445,11 @@ giveresponse(stat, force, m) else statmsg = SysExMsg[i]; if (stat == 0) + { statmsg = "ok"; + if (Verbose) + message("050", "ok"); + } else { Errors++; @@ -462,7 +466,7 @@ giveresponse(stat, force, m) } if (statmsg == NULL) usrerr("unknown mailer response %d", stat); - else if (force || !bitset(M_QUIET, m->m_flags)) + else if (force || !bitset(M_QUIET, m->m_flags) || Verbose) usrerr("%s", statmsg); } @@ -691,6 +695,8 @@ recipient(a) if (Debug) printf("(%s in sendq)\n", a->q_paddr); # endif DEBUG + if (Verbose) + message("050", "duplicate supressed"); return; } } -- 2.20.1