1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] modules/mail/smtp.c bug
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20modules/mail/smtp.c%20bug&In-Reply-To=6.0.3.0.2.20040901141752.032ad258%40pop.gate.net">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"004616.html">
11 <LINK REL=
"Next" HREF=
"004622.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices] modules/mail/smtp.c bug
</H1>
16 <A HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20modules/mail/smtp.c%20bug&In-Reply-To=6.0.3.0.2.20040901141752.032ad258%40pop.gate.net"
17 TITLE=
"[IRCServices] modules/mail/smtp.c bug">achurch at achurch.org
19 <I>Thu Sep
2 09:
42:
12 PDT
2004</I>
21 <LI>Previous message:
<A HREF=
"004616.html">[IRCServices] modules/mail/smtp.c bug
23 <LI>Next message:
<A HREF=
"004622.html">[IRCServices] Question on usage of ChanServ ACCESS LIST
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#4617">[ date ]
</a>
27 <a href=
"thread.html#4617">[ thread ]
</a>
28 <a href=
"subject.html#4617">[ subject ]
</a>
29 <a href=
"author.html#4617">[ author ]
</a>
34 <PRE> Fixed, thanks for the report. (Actually, looking over the code I'm
35 amazed it worked at all...)
38 <A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">achurch at achurch.org
</A>
39 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
41 ><i>i was just setting up ircservices today and everything is working great,
42 </I>><i>except sending mail out through the relay. i'm running
5.0.38. i apologize
43 </I>><i>if this is already know and i'm just cluttering up the list.
45 </I>><i>i'm using my isp as the relay (mailhost.gate.net:
25) and they return
46 </I>><i>multiple lines upon connecting.
48 </I>><i>220-smtp6.mindspring.com ESMTP Exim
3.33 #
1 Wed,
01 Sep
2004 14:
20:
42 -
0400
49 </I>><i>220-NO UCE. EarthLink does not authorize the use of its computers or network
50 </I>><i>220 equipment to deliver, accept, transmit, or distribute unsolicited e-mail.
52 </I>><i>and it seems that smtp.c isn't correctly handling the multiple lines.
54 </I>><i>around line
177 of smtp.c is
55 </I>><i> if (!si-
>replycode) {
57 </I>><i> si-
>replycode = strtol(buf,
&s,
10);
59 </I>><i> si-
>replychar = buf[
3];
62 </I>><i>what's happening is the first time through
63 </I>><i>220-smtp6.mindspring.com ESMTP Exim
3.33 #
1 Wed,
01 Sep
2004 14:
20:
42 -
0400
65 </I>><i>is getting parsed out as
66 </I>><i>220 and '-'
67 </I>><i>the next time through, si-
>replycode is still
220 so it's not reparsed. the
68 </I>><i>third response:
69 </I>><i>220 equipment to deliver, accept, transmit, or distribute unsolicited e-mail.
71 </I>><i>should be parsed as
220 and ' ' but it never is.
73 </I>><i>the 'fix' i implemented here that seems to work was to take the following
74 </I>><i>and break it up:
77 </I>><i> if (!have_eol || si-
>replychar != ' ')
81 </I>><i> if (!have_eol)
84 </I>><i> if (si-
>replychar != ' ')
86 </I>><i> si-
>replycode =
0;
90 </I>><i>that should cause si-
>replycode to be correctly parsed for each received line.
92 </I>><i>anyway, hope this helps somebody else having the same troubles.
94 </I>><i>thanks for the ircservices,
98 </I>><i>------------------------------------------------------------------
99 </I>><i>To unsubscribe or change your subscription options, visit:
100 </I>><i><A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">http://www.ircservices.za.net/mailman/listinfo/ircservices
</A>
109 <LI>Previous message:
<A HREF=
"004616.html">[IRCServices] modules/mail/smtp.c bug
111 <LI>Next message:
<A HREF=
"004622.html">[IRCServices] Question on usage of ChanServ ACCESS LIST
113 <LI> <B>Messages sorted by:
</B>
114 <a href=
"date.html#4617">[ date ]
</a>
115 <a href=
"thread.html#4617">[ thread ]
</a>
116 <a href=
"subject.html#4617">[ subject ]
</a>
117 <a href=
"author.html#4617">[ author ]
</a>