[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

userful patch -- finally!



Greetings,

	When Matti was here we found a very annoying bug that would
make smtp client spin if remote smtp server would violate SMTP protocol
by issueing 220 and 551 consequentally without delay and then immediately
handup. Here is the fix. Regards,
								alexis

*** smtp.c.orig Thu Dec  4 15:06:10 1997
--- smtp.c      Tue Feb  3 14:23:37 1998
***************
*** 3583,3589 ****
            smtpclose(SS);
            if (logfp)
              fprintf(logfp, "%s#\t(closed SMTP channel - hangup on smtpwrite() )\n", logtag());
!           return EX_TEMPFAIL;
          }
          /* Exit if the last thing we read was a LF and we're on the
             last line (in case of multiline response).  This
--- 3583,3589 ----
            smtpclose(SS);
            if (logfp)
              fprintf(logfp, "%s#\t(closed SMTP channel - hangup on smtpwrite() )\n", logtag());
!           return EX_UNAVAILABLE;
          }
          /* Exit if the last thing we read was a LF and we're on the
             last line (in case of multiline response).  This

PS From /usr/include/sysexits.h, exactly the case :-)

**      EX_UNAVAILABLE -- A service is unavailable.  This can occur
**              if a support program or file does not exist.  This
**              can also be used as a catchall message when something
**              you wanted to do doesn't work, but you don't know
**              why.

	One might want to use EX_PROTOCOL instead, but these last
lines from EX_UNAVAILABLE sound just sweet!
-- 
			Where the wild horses run