$Log$
+ Revision 605.38 2003/04/26 04:22:51 ajc
+ * Removal of individual "remote" lines from message delivery instruction sets
+ was corrupting the end of the set, rendering the "bounceto" line unusable
+ and preventing bounces from being delivered. Fixed this by explicitly
+ adding a trailing newline when remove_token() strips it.
+
Revision 605.37 2003/04/25 18:28:47 ajc
* When rejecting spam, use SMTP error code 550, not 552
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
/*
* Now go through the instructions checking for stuff.
*/
-
for (i=0; i<lines; ++i) {
extract_token(buf, instr, i, '\n');
extract(key, buf, 0);
extract(dsn, buf, 3);
if ( (!strcasecmp(key, "remote"))
&& ((status==0)||(status==3)||(status==4)) ) {
+
+ /* Remove this "remote" instruction from the set,
+ * but replace the set's final newline if
+ * remove_token() stripped it. It has to be there.
+ */
remove_token(instr, i, '\n');
+ if (instr[strlen(instr)-1] != '\n') {
+ strcat(instr, "\n");
+ }
+
--i;
--lines;
lprintf(9, "SMTP: Trying <%s>\n", addr);