[Date Prev][Date Next] [Chronological] [Thread] [Top]

mail500 changes



Here are a few changes to mail500 that you'll want to include.  We run
approximately one million messages each week through mail500, and we've
found these changes to greatly reduce the number of infinite loops and
other catastophic mail500 problems.

The first change limits rewriting of the "MAIL FROM:" in the case that
mail comes from the null address "<>".

The second change causes all bounce messages to come from the null
address.

The third change causes bounces that would go to "<>" to be delivered
to the command-line specified "errorsfrom" address, e.g.
mailer-daemon.

Also, MAIL500_BOUNCEFROM should be defined somewhere as "<>".  I've
used ldapconfig.h, tho it could be argued that "<>", as part of the
SMTP specification, is not really a configuration option.

FYI, I'm in the process of upgrading our mail500 servers, and am using
the openldap distribution, rather than the UMich distribution.  Thought
you might find that interesting.

:wes
*** main.c	Sat Aug  8 18:43:17 1998
--- /usr/local/users/wes/main.c	Thu Nov  5 15:40:56 1998
***************
*** 734,740 ****
  		/* else from the moderator - fall through and deliver it */
  	}
  
! 	if ( has_attributes( e, "rfc822ErrorsTo", "errorsTo" ) ) {
  		add_group( dn, togroups, ngroups );
  
  		return( 0 );
--- 734,741 ----
  		/* else from the moderator - fall through and deliver it */
  	}
  
! 	if (strcmp(MAIL500_BOUNCEFROM, mailfrom) != 0 &&
! 	    has_attributes( e, "rfc822ErrorsTo", "errorsTo" ) ) {
  		add_group( dn, togroups, ngroups );
  
  		return( 0 );
***************
*** 1140,1151 ****
  	WAITSTATUSTYPE	status;
  #endif
  
  	argv[0] = MAIL500_SENDMAIL;
  	argv[1] = "-oMrX.500";
  	argv[2] = "-odi";
  	argv[3] = "-oi";
  	argv[4] = "-f";
! 	argv[5] = errorsfrom;
  	argv[6] = mailfrom;
  	argv[7] = NULL;
  
--- 1141,1156 ----
  	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] = MAIL500_BOUNCEFROM;
  	argv[6] = mailfrom;
  	argv[7] = NULL;