1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../qmail/hotfixes.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
16 --- qmail-1.03/Makefile Mon Jun 15 06:53:16 1998
17 +++ netqmail-1.05/Makefile Wed Jan 21 12:58:12 2004
22 -compile cdbmake_add.c cdbmake.h uint32.h
23 +compile cdbmake_add.c cdbmake.h alloc.h uint32.h
24 ./compile cdbmake_add.c
30 compile chkspawn spawn.c sig.h wait.h substdio.h byte.h str.h \
31 -stralloc.h gen_alloc.h select.h exit.h coe.h open.h error.h \
32 +stralloc.h gen_alloc.h select.h exit.h alloc.h coe.h open.h error.h \
33 auto_qmail.h auto_uids.h auto_spawn.h
36 --- qmail-1.03/cdbmake_add.c Mon Jun 15 06:53:16 1998
37 +++ netqmail-1.05/cdbmake_add.c Wed Jan 21 12:58:12 2004
42 void cdbmake_init(cdbm)
43 --- qmail-1.03/qmail-local.c Mon Jun 15 06:53:16 1998
44 +++ netqmail-1.05/qmail-local.c Wed Jan 21 12:58:12 2004
49 - while ((k > i) && (cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t'))
50 + while ((k > i) && ((cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t')))
54 --- qmail-1.03/qmail-pop3d.c Mon Jun 15 06:53:16 1998
55 +++ netqmail-1.05/qmail-pop3d.c Wed Jan 21 12:58:12 2004
57 void die_scan() { err("unable to scan $HOME/Maildir"); die(); }
59 void err_syntax() { err("syntax error"); }
60 -void err_unimpl() { err("unimplemented"); }
61 +void err_unimpl(arg) char *arg; { err("unimplemented"); }
62 void err_deleted() { err("already deleted"); }
63 void err_nozero() { err("messages are counted from 1"); }
64 void err_toobig() { err("not that many messages"); }
65 void err_nosuch() { err("unable to open that message"); }
66 void err_nounlink() { err("unable to unlink all deleted messages"); }
68 -void okay() { puts("+OK \r\n"); flush(); }
69 +void okay(arg) char *arg; { puts("+OK \r\n"); flush(); }
71 void printfn(fn) char *fn;
78 +void pop3_stat(arg) char *arg;
87 +void pop3_rset(arg) char *arg;
90 for (i = 0;i < numm;++i) m[i].flagdeleted = 0;
97 +void pop3_last(arg) char *arg;
100 put(strnum,fmt_uint(strnum,last));
106 +void pop3_quit(arg) char *arg;
109 for (i = 0;i < numm;++i)
111 if (!stralloc_0(&line)) die_nomem();
112 rename(m[i].fn,line.s); /* if it fails, bummer */
121 m[i].flagdeleted = 1;
122 if (i + 1 > last) last = i + 1;
127 void list(i,flaguidl)
134 for (i = 0;i < numm;++i)
135 if (!m[i].flagdeleted)
139 fd = open_read(m[i].fn);
140 if (fd == -1) { err_nosuch(); return; }
143 substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf));
152 commands(&ssin,pop3commands);
155 --- qmail-1.03/qmail-popup.c Mon Jun 15 06:53:16 1998
156 +++ netqmail-1.05/qmail-popup.c Wed Jan 21 12:58:12 2004
159 void err_syntax() { err("syntax error"); }
160 void err_wantuser() { err("USER first"); }
161 -void err_authoriz() { err("authorization first"); }
162 +void err_authoriz(arg) char *arg; { err("authorization first"); }
164 -void okay() { puts("+OK \r\n"); flush(); }
165 -void pop3_quit() { okay(); die(); }
166 +void okay(arg) char *arg; { puts("+OK \r\n"); flush(); }
167 +void pop3_quit(arg) char *arg; { okay(0); die(); }
170 char unique[FMT_ULONG + FMT_ULONG + 3];
172 void pop3_user(arg) char *arg;
174 if (!*arg) { err_syntax(); return; }
178 if (!stralloc_copys(&username,arg)) die_nomem();
179 if (!stralloc_0(&username)) die_nomem();
180 --- qmail-1.03/qmail-smtpd.c Mon Jun 15 06:53:16 1998
181 +++ netqmail-1.05/qmail-smtpd.c Wed Jan 21 12:58:12 2004
184 void err_bmf() { out("553 sorry, your envelope sender is in my badmailfrom list (#5.7.1)\r\n"); }
185 void err_nogateway() { out("553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)\r\n"); }
186 -void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); }
187 +void err_unimpl(arg) char *arg; { out("502 unimplemented (#5.5.1)\r\n"); }
188 void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }
189 void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
190 void err_wantrcpt() { out("503 RCPT first (#5.5.1)\r\n"); }
191 -void err_noop() { out("250 ok\r\n"); }
192 -void err_vrfy() { out("252 send some mail, i'll try my best\r\n"); }
193 +void err_noop(arg) char *arg; { out("250 ok\r\n"); }
194 +void err_vrfy(arg) char *arg; { out("252 send some mail, i'll try my best\r\n"); }
195 void err_qqt() { out("451 qqt failure (#4.3.0)\r\n"); }
199 substdio_puts(&ssout,code);
200 substdio_put(&ssout,greeting.s,greeting.len);
203 +void smtp_help(arg) char *arg;
205 out("214 qmail home page: http://pobox.com/~djb/qmail.html\r\n");
208 +void smtp_quit(arg) char *arg;
210 smtp_greet("221 "); out("\r\n"); flush(); _exit(0);
213 smtp_greet("250-"); out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
214 seenmail = 0; dohelo(arg);
217 +void smtp_rset(arg) char *arg;
220 out("250 flushed\r\n");
222 if (flagmaybex) if (pos == 7) ++*hops;
223 if (pos < 2) if (ch != "\r\n"[pos]) flagmaybey = 0;
224 if (flagmaybey) if (pos == 1) flaginheader = 0;
228 if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; }
236 +void smtp_data(arg) char *arg; {
240 --- qmail-1.03/spawn.c Mon Jun 15 06:53:16 1998
241 +++ netqmail-1.05/spawn.c Wed Jan 21 12:58:12 2004
243 #include "substdio.h"
247 #include "stralloc.h"