]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/2004/004617.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 2004 / 004617.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] modules/mail/smtp.c bug
5 </TITLE>
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">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] modules/mail/smtp.c bug</H1>
15 <B>Andrew Church</B>
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
18 </A><BR>
19 <I>Thu Sep 2 09:42:12 PDT 2004</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="004616.html">[IRCServices] modules/mail/smtp.c bug
22 </A></li>
23 <LI>Next message: <A HREF="004622.html">[IRCServices] Question on usage of ChanServ ACCESS LIST
24 </A></li>
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>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE> Fixed, thanks for the report. (Actually, looking over the code I'm
35 amazed it worked at all...)
36
37 --Andrew Church
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>
40
41 &gt;<i>i was just setting up ircservices today and everything is working great,
42 </I>&gt;<i>except sending mail out through the relay. i'm running 5.0.38. i apologize
43 </I>&gt;<i>if this is already know and i'm just cluttering up the list.
44 </I>&gt;<i>
45 </I>&gt;<i>i'm using my isp as the relay (mailhost.gate.net:25) and they return
46 </I>&gt;<i>multiple lines upon connecting.
47 </I>&gt;<i>
48 </I>&gt;<i>220-smtp6.mindspring.com ESMTP Exim 3.33 #1 Wed, 01 Sep 2004 14:20:42 -0400
49 </I>&gt;<i>220-NO UCE. EarthLink does not authorize the use of its computers or network
50 </I>&gt;<i>220 equipment to deliver, accept, transmit, or distribute unsolicited e-mail.
51 </I>&gt;<i>
52 </I>&gt;<i>and it seems that smtp.c isn't correctly handling the multiple lines.
53 </I>&gt;<i>
54 </I>&gt;<i>around line 177 of smtp.c is
55 </I>&gt;<i> if (!si-&gt;replycode) {
56 </I>&gt;<i>...
57 </I>&gt;<i> si-&gt;replycode = strtol(buf, &amp;s, 10);
58 </I>&gt;<i>...
59 </I>&gt;<i> si-&gt;replychar = buf[3];
60 </I>&gt;<i>}
61 </I>&gt;<i>
62 </I>&gt;<i>what's happening is the first time through
63 </I>&gt;<i>220-smtp6.mindspring.com ESMTP Exim 3.33 #1 Wed, 01 Sep 2004 14:20:42 -0400
64 </I>&gt;<i>
65 </I>&gt;<i>is getting parsed out as
66 </I>&gt;<i>220 and '-'
67 </I>&gt;<i>the next time through, si-&gt;replycode is still 220 so it's not reparsed. the
68 </I>&gt;<i>third response:
69 </I>&gt;<i>220 equipment to deliver, accept, transmit, or distribute unsolicited e-mail.
70 </I>&gt;<i>
71 </I>&gt;<i>should be parsed as 220 and ' ' but it never is.
72 </I>&gt;<i>
73 </I>&gt;<i>the 'fix' i implemented here that seems to work was to take the following
74 </I>&gt;<i>and break it up:
75 </I>&gt;<i>
76 </I>&gt;<i>old:
77 </I>&gt;<i> if (!have_eol || si-&gt;replychar != ' ')
78 </I>&gt;<i> return;
79 </I>&gt;<i>
80 </I>&gt;<i>new:
81 </I>&gt;<i> if (!have_eol)
82 </I>&gt;<i> return;
83 </I>&gt;<i>
84 </I>&gt;<i> if (si-&gt;replychar != ' ')
85 </I>&gt;<i> {
86 </I>&gt;<i> si-&gt;replycode = 0;
87 </I>&gt;<i> return;
88 </I>&gt;<i> }
89 </I>&gt;<i>
90 </I>&gt;<i>that should cause si-&gt;replycode to be correctly parsed for each received line.
91 </I>&gt;<i>
92 </I>&gt;<i>anyway, hope this helps somebody else having the same troubles.
93 </I>&gt;<i>
94 </I>&gt;<i>thanks for the ircservices,
95 </I>&gt;<i>-gregg
96 </I>&gt;<i>
97 </I>&gt;<i>
98 </I>&gt;<i>------------------------------------------------------------------
99 </I>&gt;<i>To unsubscribe or change your subscription options, visit:
100 </I>&gt;<i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">http://www.ircservices.za.net/mailman/listinfo/ircservices</A>
101 </I>
102
103 </PRE>
104
105 <!--endarticle-->
106 <HR>
107 <P><UL>
108 <!--threads-->
109 <LI>Previous message: <A HREF="004616.html">[IRCServices] modules/mail/smtp.c bug
110 </A></li>
111 <LI>Next message: <A HREF="004622.html">[IRCServices] Question on usage of ChanServ ACCESS LIST
112 </A></li>
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>
118 </LI>
119 </UL>
120
121 </body></html>