#include "ldapconfig.h"
+#ifndef MAIL500_BOUNCEFROM
+#define MAIL500_BOUNCEFROM "<>"
+#endif
+
#define USER 0x01
#define GROUP_ERRORS 0x02
#define GROUP_REQUEST 0x04
/* 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 );
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;