From: Kurt Zeilenga Date: Sat, 5 Dec 1998 03:55:39 +0000 (+0000) Subject: Apply bounce from fix. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d538a1d2957d76e5891319d44baa34cfb262be7;p=thirdparty%2Fopenldap.git Apply bounce from fix. --- diff --git a/clients/mail500/main.c b/clients/mail500/main.c index 5fdea96201..a3c58f9de5 100644 --- a/clients/mail500/main.c +++ b/clients/mail500/main.c @@ -41,6 +41,8 @@ #define OWNER "owner" #define OWNERS "owners" +#define MAIL500_BOUNCEFROM "<>" + LDAP *ld; char *vacationhost = NULL; char *errorsfrom = NULL; @@ -734,7 +736,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 ); @@ -1140,12 +1143,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;