]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2004/004616.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2004 / 004616.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=">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="004615.html">
11 <LINK REL="Next" HREF="004617.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] modules/mail/smtp.c bug</H1>
15 <B>gregg conklin</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20modules/mail/smtp.c%20bug&In-Reply-To="
17 TITLE="[IRCServices] modules/mail/smtp.c bug">greco at gate.net
18 </A><BR>
19 <I>Wed Sep 1 11:41:46 PDT 2004</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="004615.html">[IRCServices] &quot;Read Only Mode&quot;
22 </A></li>
23 <LI>Next message: <A HREF="004617.html">[IRCServices] modules/mail/smtp.c bug
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#4616">[ date ]</a>
27 <a href="thread.html#4616">[ thread ]</a>
28 <a href="subject.html#4616">[ subject ]</a>
29 <a href="author.html#4616">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>i was just setting up ircservices today and everything is working great,
35 except sending mail out through the relay. i'm running 5.0.38. i apologize
36 if this is already know and i'm just cluttering up the list.
37
38 i'm using my isp as the relay (mailhost.gate.net:25) and they return
39 multiple lines upon connecting.
40
41 220-smtp6.mindspring.com ESMTP Exim 3.33 #1 Wed, 01 Sep 2004 14:20:42 -0400
42 220-NO UCE. EarthLink does not authorize the use of its computers or network
43 220 equipment to deliver, accept, transmit, or distribute unsolicited e-mail.
44
45 and it seems that smtp.c isn't correctly handling the multiple lines.
46
47 around line 177 of smtp.c is
48 if (!si-&gt;replycode) {
49 ...
50 si-&gt;replycode = strtol(buf, &amp;s, 10);
51 ...
52 si-&gt;replychar = buf[3];
53 }
54
55 what's happening is the first time through
56 220-smtp6.mindspring.com ESMTP Exim 3.33 #1 Wed, 01 Sep 2004 14:20:42 -0400
57
58 is getting parsed out as
59 220 and '-'
60 the next time through, si-&gt;replycode is still 220 so it's not reparsed. the
61 third response:
62 220 equipment to deliver, accept, transmit, or distribute unsolicited e-mail.
63
64 should be parsed as 220 and ' ' but it never is.
65
66 the 'fix' i implemented here that seems to work was to take the following
67 and break it up:
68
69 old:
70 if (!have_eol || si-&gt;replychar != ' ')
71 return;
72
73 new:
74 if (!have_eol)
75 return;
76
77 if (si-&gt;replychar != ' ')
78 {
79 si-&gt;replycode = 0;
80 return;
81 }
82
83 that should cause si-&gt;replycode to be correctly parsed for each received line.
84
85 anyway, hope this helps somebody else having the same troubles.
86
87 thanks for the ircservices,
88 -gregg
89
90
91
92 </PRE>
93
94 <!--endarticle-->
95 <HR>
96 <P><UL>
97 <!--threads-->
98 <LI>Previous message: <A HREF="004615.html">[IRCServices] &quot;Read Only Mode&quot;
99 </A></li>
100 <LI>Next message: <A HREF="004617.html">[IRCServices] modules/mail/smtp.c bug
101 </A></li>
102 <LI> <B>Messages sorted by:</B>
103 <a href="date.html#4616">[ date ]</a>
104 <a href="thread.html#4616">[ thread ]</a>
105 <a href="subject.html#4616">[ subject ]</a>
106 <a href="author.html#4616">[ author ]</a>
107 </LI>
108 </UL>
109
110 </body></html>