16 Aug 2002 17:19
RE: Odd registrar behaviour
Albert Meltzer <albertm <at> gpo.stanford.edu>
2002-08-16 15:19:36 GMT
2002-08-16 15:19:36 GMT
Since the TLS patch says HELO twice, you'd either check for 5xx the
first time only... or both times (if, by another RFC, all knowledge
before STARTTLS should be forgotten). In any case, to make the patch
apply, we need to ask Frederik kindly to create an empty line after the
"#endif" preceding the 220 check and before the second "#ifdef TLS" to
create a one-line context. And create the 5xx patch with 2 lines of
context to split it into two chunks...
Patch to TLS patch:
--- qmail-remote.c.ok Tue Jul 23 20:18:00 2002
+++ qmail-remote.c Fri Aug 16 08:05:02 2002
<at> <at> -325,6 +325,7 <at> <at>
#endif
if (!smtps) {
#endif
+
if (smtpcode() != 220) quit("ZConnected to "," but greeting failed");
#ifdef TLS
<at> <at> -339,6 +340,7 <at> <at>
substdio_puts(&smtpto,"\r\n");
substdio_flush(&smtpto);
if (smtpcode() != 250) quit("ZConnected to "," but my name was
rejected");
+
#ifdef TLS
}
Patch for 5xx:
--- qmail-remote.c.orig Mon Jun 15 03:53:16 1998
+++ qmail-remote.c Fri Aug 16 08:09:45 2002
<at> <at> -223,5 +223,7 <at> <at>
int i;
- if (smtpcode() != 220) quit("ZConnected to "," but greeting failed");
+ code = smtpcode();
+ if (code >= 500) quit("DConnected to "," but greeting failed");
+ if (code != 220) quit("ZConnected to "," but greeting failed");
substdio_puts(&smtpto,"HELO ");
<at> <at> -229,5 +231,7 <at> <at>
substdio_puts(&smtpto,"\r\n");
substdio_flush(&smtpto);
- if (smtpcode() != 250) quit("ZConnected to "," but my name was
rejected");
+ code = smtpcode();
+ if (code >= 500) quit("DConnected to "," but my name was rejected");
+ if (code != 250) quit("ZConnected to "," but my name was rejected");
substdio_puts(&smtpto,"MAIL FROM:<");
-----Original Message-----
From: Lars Hansson [mailto:lars <at> unet.net.ph]
Sent: Friday, August 16, 2002 1:04 AM
To: qmail <at> list.cr.yp.to
Subject: Re: Odd registrar behaviour
> I'll post the final corrected patch /after/ I've tested it myself.
> (Unless someone else beats me to it first, in which case I'll gladly
> relinquish all credit on qmail.org.)
On a related note, anyone knows how to make it work with the TLS
patches? (Vermeulen's patches)
---
Lars Hansson
RSS Feed