From 9c3fa68fa5449c66b21327219725ca74c1c07443 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 6 Nov 1998 20:39:22 +0000 Subject: [PATCH] mail500 changes from wesley.craig@umich.edu --- clients/mail500/main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/clients/mail500/main.c b/clients/mail500/main.c index d7cfe3e62f..31406ac229 100644 --- a/clients/mail500/main.c +++ b/clients/mail500/main.c @@ -33,6 +33,10 @@ #include "ldapconfig.h" +#ifndef MAIL500_BOUNCEFROM +#define MAIL500_BOUNCEFROM "<>" +#endif + #define USER 0x01 #define GROUP_ERRORS 0x02 #define GROUP_REQUEST 0x04 @@ -745,7 +749,8 @@ do_group( e, dn, to, nto, togroups, ngroups, err, nerr ) /* else from the moderator - fall through and deliver it */ } - if ( has_attributes( e, "rfc822ErrorsTo", "errorsTo" ) ) { + if (strcmp(MAIL500_BOUNCEFROM, mailfrom) != 0 && + has_attributes( e, "rfc822ErrorsTo", "errorsTo" ) ) { add_group( dn, togroups, ngroups ); return( 0 ); @@ -1154,12 +1159,16 @@ send_errors( err, nerr ) WAITSTATUSTYPE status; #endif + if ( strcmp( MAIL500_BOUNCEFROM, mailfrom ) == 0 ) { + mailfrom = errorsfrom; + } + argv[0] = MAIL500_SENDMAIL; argv[1] = "-oMrX.500"; argv[2] = "-odi"; argv[3] = "-oi"; argv[4] = "-f"; - argv[5] = errorsfrom; + argv[5] = MAIL500_BOUNCEFROM; argv[6] = mailfrom; argv[7] = NULL; -- 2.39.5