print both actual address and q_alias whereever possible
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.5
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 8.5
-static char sccsid[] = "@(#)envelope.c 8.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.5 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
strcmp(e->e_from.q_paddr, "<>") != 0)
(void) sendtolist(e->e_from.q_paddr, NULL,
&e->e_errorqueue, e);
strcmp(e->e_from.q_paddr, "<>") != 0)
(void) sendtolist(e->e_from.q_paddr, NULL,
&e->e_errorqueue, e);
if (saveit && e->e_errormode != EM_QUIET)
savemail(e);
if (saveit && e->e_errormode != EM_QUIET)
savemail(e);
+ /*
+ ** Arrange to send warning messages to postmaster as requested.
+ */
+
+ if (bitset(EF_PM_NOTIFY, e->e_flags) && PostMasterCopy != NULL &&
+ !bitset(EF_RESPONSE, e->e_flags))
+ {
+ auto ADDRESS *rlist = NULL;
+
+ (void) sendtolist(PostMasterCopy, (ADDRESS *) NULL, &rlist, e);
+ (void) returntosender(e->e_message, rlist, FALSE, e);
+ }
+
/*
** Instantiate or deinstantiate the queue.
*/
/*
** Instantiate or deinstantiate the queue.
*/
-static char sccsid[] = "@(#)savemail.c 8.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 8.5 (Berkeley) %G%";
#endif /* not lint */
# include <pwd.h>
#endif /* not lint */
# include <pwd.h>
** You really shouldn't need this.
*/
** You really shouldn't need this.
*/
- if (PostMasterCopy != NULL)
- {
- auto ADDRESS *rlist = NULL;
-
- (void) sendtolist(PostMasterCopy,
- (ADDRESS *) NULL,
- &rlist, e);
- (void) returntosender(e->e_message,
- rlist, FALSE, e);
- }
+ e->e_flags |= EF_PM_NOTIFY;
q = e->e_errorqueue;
if (q == NULL)
q = e->e_errorqueue;
if (q == NULL)
fp, m);
printheader = FALSE;
}
fp, m);
printheader = FALSE;
}
- if (q->q_alias != NULL)
- strcpy(buf, q->q_alias->q_paddr);
- else
- strcpy(buf, q->q_paddr);
+ strcpy(buf, q->q_paddr);
if (bitset(QBADADDR, q->q_flags))
if (bitset(QBADADDR, q->q_flags))
- strcat(buf, " (hard error -- address deleted)");
+ strcat(buf, " (unrecoverable error)");
- strcat(buf, " (temporary failure -- will retry)");
+ strcat(buf, " (transient failure)");
+ if (q->q_alias != NULL)
+ {
+ strcpy(buf, " (expanded from: ");
+ strcat(buf, q->q_alias->q_paddr);
+ strcat(buf, ")");
+ putline(buf, fp, m);
+ }