aboutsummaryrefslogtreecommitdiff
path: root/mail/qmail-spamcontrol
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2005-07-13 19:28:45 +0000
committerRenato Botelho <garga@FreeBSD.org>2005-07-13 19:28:45 +0000
commit1541d046739d236c4a5a718b575a435f00333aac (patch)
treec2dbe5dae79f3e9e37d9ba2a5cf2b39c3efe10da /mail/qmail-spamcontrol
parent8cbc5bbc2dbf8b8a948c43a7528080e873135ffd (diff)
downloadports-1541d046739d236c4a5a718b575a435f00333aac.tar.gz
ports-1541d046739d236c4a5a718b575a435f00333aac.zip
Notes
Diffstat (limited to 'mail/qmail-spamcontrol')
-rw-r--r--mail/qmail-spamcontrol/Makefile4
-rw-r--r--mail/qmail-spamcontrol/files/patch-qmail-smtpd.c.patch112
2 files changed, 63 insertions, 53 deletions
diff --git a/mail/qmail-spamcontrol/Makefile b/mail/qmail-spamcontrol/Makefile
index a228040245bb..0fff70dab085 100644
--- a/mail/qmail-spamcontrol/Makefile
+++ b/mail/qmail-spamcontrol/Makefile
@@ -7,7 +7,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
-PORTREVISION= 1
+PORTREVISION= 0
CATEGORIES= mail
MASTER_SITES+= http://www.fehcom.de/qmail/spamcontrol/:spamcontrol
PKGNAMESUFFIX= -spamcontrol
@@ -21,7 +21,7 @@ EXTRA_PATCHES+= ${MASTERDIR}/files/patch-install.c
# Distfiles
QMAIL_DIST= ${PORTNAME}-${QMAIL_VERSION}${EXTRACT_SUFX}
SPAMCONTROL_DIST= spamcontrol-${SPAMCONTROL_VERSION}_tgz.bin
-SPAMCONTROL_VERSION= 2314
+SPAMCONTROL_VERSION= 2316
LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
SLAVE_SPAMCONTROL= yes
diff --git a/mail/qmail-spamcontrol/files/patch-qmail-smtpd.c.patch b/mail/qmail-spamcontrol/files/patch-qmail-smtpd.c.patch
index 270c2e992b88..809ff72328d1 100644
--- a/mail/qmail-spamcontrol/files/patch-qmail-smtpd.c.patch
+++ b/mail/qmail-spamcontrol/files/patch-qmail-smtpd.c.patch
@@ -1,124 +1,130 @@
---- ../orig/qmail-smtpd.c.patch Mon May 23 18:02:27 2005
-+++ qmail-smtpd.c.patch Wed May 25 09:50:32 2005
+--- ../orig/qmail-smtpd.c.patch Sat Jul 9 07:16:04 2005
++++ qmail-smtpd.c.patch Wed Jul 13 13:40:58 2005
@@ -1,8 +1,6 @@
---- qmail-smtpd.c.orig 1998-06-15
--+++ qmail-smtpd.c 2005-05-23
+-+++ qmail-smtpd.c 2005-07-09
---- .././qmail-1.03/qmail-smtpd.c Mon Jun 15 12:53:16 1998
--+++ ../qmail-1.03.2314/qmail-smtpd.c Mon May 23 23:02:20 2005
+-+++ ../qmail-1.03.2316/qmail-smtpd.c Sun Jun 26 20:57:36 2005
-@@ -20,14 +20,51 @@
-+--- qmail-smtpd.c.orig Wed May 25 09:46:36 2005
-++++ qmail-smtpd.c Wed May 25 09:50:11 2005
-+@@ -20,14 +20,52 @@
++--- qmail-smtpd.c.orig Wed Jul 13 13:31:14 2005
+++++ qmail-smtpd.c Wed Jul 13 13:40:38 2005
++@@ -20,14 +20,54 @@
#include "now.h"
#include "exit.h"
#include "rcpthosts.h"
-@@ -20,6 +18,7 @@
+@@ -20,6 +18,9 @@
+#define CRAM_MD5
+#define AUTHSLEEP 5
+#define RECIPIENTS550
+++// <Added by Garga>
++#define LOCALMFREQAUTH
+++// </Added by Garga>
+
+#define MIMETYPE_LEN 9
+#define LOADER_LEN 5
-@@ -55,7 +54,7 @@
+@@ -55,7 +56,7 @@
int safewrite(fd,buf,len) int fd; char *buf; int len;
{
int r;
-@@ -48,9 +85,6 @@
-+@@ -48,9 +86,6 @@
++@@ -48,9 +88,6 @@
void die_control() { out("421 unable to read controls (#4.3.0)\r\n"); flush(); _exit(1); }
void die_ipme() { out("421 unable to figure out my IP addresses (#4.3.0)\r\n"); flush(); _exit(1); }
void straynewline() { out("451 See http://pobox.com/~djb/docs/smtplf.html.\r\n"); flush(); _exit(1); }
-@@ -65,7 +64,7 @@
+@@ -65,7 +66,7 @@
void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); }
void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }
void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
-@@ -58,6 +92,114 @@
-+@@ -58,6 +93,114 @@
++@@ -58,6 +95,114 @@
void err_noop() { out("250 ok\r\n"); }
void err_vrfy() { out("252 send some mail, i'll try my best\r\n"); }
void err_qqt() { out("451 qqt failure (#4.3.0)\r\n"); }
-@@ -180,7 +179,7 @@
+@@ -180,7 +181,7 @@
stralloc greeting = {0};
-@@ -76,6 +218,7 @@
-+@@ -76,6 +219,7 @@
++@@ -76,6 +221,7 @@
smtp_greet("221 "); out("\r\n"); flush(); _exit(0);
}
-@@ -188,7 +187,7 @@
+@@ -188,7 +189,7 @@
char *remoteip;
char *remotehost;
char *remoteinfo;
-@@ -85,10 +228,30 @@
-+@@ -85,10 +229,30 @@
++@@ -85,10 +231,30 @@
stralloc helohost = {0};
char *fakehelo; /* pointer into helohost, or 0 */
-@@ -220,7 +219,7 @@
+@@ -220,7 +221,7 @@
}
int liphostok = 0;
-@@ -97,6 +260,39 @@
-+@@ -97,6 +261,40 @@
++@@ -97,6 +263,42 @@
stralloc bmf = {0};
struct constmap mapbmf;
-@@ -248,6 +247,7 @@
+@@ -248,6 +249,9 @@
+char *localmfcheck;
+char *mfdnscheck;
+char *reqauth;
+++// <Added by Garga>
++char *localmf_reqauth;
+++// </Added by Garga>
+
+int maxrcptcount = 0;
+int flaglocal = -1;
-@@ -260,7 +260,7 @@
+@@ -260,7 +264,7 @@
void setup()
{
char *x;
-@@ -111,17 +307,24 @@
-+@@ -111,17 +309,24 @@
++@@ -111,17 +313,24 @@
if (timeout <= 0) timeout = 1;
if (rcpthosts_init() == -1) die_control();
-@@ -286,7 +286,7 @@
+@@ -286,7 +290,7 @@
remoteip = env_get("TCPREMOTEIP");
if (!remoteip) remoteip = "unknown";
local = env_get("TCPLOCALHOST");
--@@ -131,11 +334,70 @@
-+@@ -131,11 +336,76 @@
+-@@ -131,11 +334,72 @@
++@@ -131,11 +340,80 @@
if (!remotehost) remotehost = "unknown";
remoteinfo = env_get("TCPREMOTEINFO");
relayclient = env_get("RELAYCLIENT");
-@@ -338,6 +338,12 @@
+@@ -338,6 +342,14 @@
+ qhpsi = env_get("QHPSI");
+ if (!qhpsi) qhpsi = "unknown";
+
+++// <Added by Garga>
++#ifdef LOCALMFREQAUTH
++ localmf_reqauth = env_get("LOCALMFREQAUTH");
++#else
++ localmf_reqauth = 0;
++#endif
+++// </Added by Garga>
++
+#ifdef RELAYMAILFROM
+ if (!relayclient) {
+ relaymailfromok = control_readfile(&relaymailfrom,"control/relaymailfrom",0);
-@@ -358,7 +364,7 @@
+@@ -360,7 +372,7 @@
int addrparse(arg)
char *arg;
--@@ -151,12 +413,17 @@
-+@@ -151,12 +421,17 @@
+-@@ -151,12 +415,17 @@
++@@ -151,12 +429,17 @@
i = str_chr(arg,'<');
if (arg[i])
arg += i + 1;
-@@ -376,17 +382,12 @@
+@@ -378,17 +390,12 @@
/* strip source route */
if (*arg == '@') while (*arg) if (*arg++ == ':') break;
--@@ -199,12 +466,105 @@
-+@@ -199,12 +474,105 @@
+-@@ -199,12 +468,106 @@
++@@ -199,12 +482,106 @@
int bmfcheck()
{
@@ -133,7 +139,7 @@
+ int k = 0;
+ char subvalue;
+
-@@ -436,7 +437,12 @@
+@@ -439,7 +446,12 @@
+int bhelocheck()
+{
+ int i;
@@ -147,19 +153,20 @@
+ int k = 0;
+ char subvalue;
+
-@@ -487,7 +493,7 @@
+@@ -490,7 +502,7 @@
return 0;
}
--@@ -216,54 +576,204 @@
-+@@ -216,54 +584,215 @@
+-@@ -216,54 +579,204 @@
++@@ -216,54 +593,219 @@
return r;
}
-@@ -582,6 +588,16 @@
+@@ -585,6 +597,18 @@
+ }
+}
+
+++// <Added by Garga>
++int mailfromallowed()
++{
++ int r;
@@ -169,46 +176,49 @@
++
++ return ((r == 1) ? 0 : 1);
++}
+++// </Added by Garga>
++
+#ifdef RELAYMAILFROM
+int rmfcheck()
+{
-@@ -664,6 +680,7 @@
+@@ -667,6 +691,9 @@
+ if (flagbarf) { err_bmf("Reject::ORIG::Bad_Mailfrom:",remoteip,remotehost,helohost.s,mailfrom.s,addr.s); return; }
+ if (flagdnsmf > 0) { err_mfdns("Reject::ORIG::DNS_MF:",remoteip,remotehost,helohost.s,mailfrom.s,addr.s); return; }
+ if (reqauth) if (!flagauth) { err_authreq("Reject::ORIG::Missing_Auth:",remoteip,remotehost,helohost.s,mailfrom.s,addr.s); return; }
+++ // <Added by Garga>
++ if (localmf_reqauth && !flagauth && !mailfromallowed()) { err_authreq("Reject::ORIG::Local_MailFrom_Req_Auth:",remoteip,remotehost,helohost.s,mailfrom.s,addr.s); return; }
+++ // </Added by Garga>
+ flagrcpt = rcptallowed();
+ if (!flagrcpt) { err_recipient("Reject::RCPT::Failed_Rcptto:",remoteip,remotehost,helohost.s,mailfrom.s,addr.s); flagerrcpts++; return; }
+ if (tarpitcount && flagerrcpts >= tarpitcount) { err_rcpts("Reject::RCPT::Toomany_Rcptto:",remoteip,remotehost,helohost.s,mailfrom.s,addr.s); return; }
-@@ -702,7 +719,7 @@
+@@ -705,7 +732,7 @@
int saferead(fd,buf,len) int fd; char *buf; int len;
{
--@@ -279,11 +789,69 @@
-+@@ -279,11 +808,69 @@
+-@@ -279,11 +792,69 @@
++@@ -279,11 +821,69 @@
substdio ssin = SUBSTDIO_FDBUF(saferead,0,ssinbuf,sizeof ssinbuf);
struct qmail qqt;
-@@ -773,7 +790,7 @@
+@@ -776,7 +803,7 @@
if (bytestooverflow)
if (!--bytestooverflow)
qmail_fail(&qqt);
--@@ -316,8 +884,8 @@
-+@@ -316,8 +903,8 @@
+-@@ -316,8 +887,8 @@
++@@ -316,8 +916,8 @@
if (flagmaybex) if (pos == 7) ++*hops;
if (pos < 2) if (ch != "\r\n"[pos]) flagmaybey = 0;
if (flagmaybey) if (pos == 1) flaginheader = 0;
-@@ -783,7 +800,7 @@
+@@ -786,7 +813,7 @@
if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; }
}
switch(state) {
--@@ -373,31 +941,275 @@
-+@@ -373,31 +960,275 @@
+-@@ -373,31 +944,275 @@
++@@ -373,31 +973,275 @@
if (!seenmail) { err_wantmail(); return; }
if (!rcptto.len) { err_wantrcpt(); return; }
seenmail = 0;
-@@ -996,7 +1013,7 @@
+@@ -999,7 +1026,7 @@
+
+ if (!user.len || !pass.len) return err_input();
+ return authenticate();
@@ -217,7 +227,7 @@
+#endif
+
+struct authcmd {
-@@ -1051,10 +1068,10 @@
+@@ -1054,10 +1081,10 @@
+ case 1:
+ err_authfail("Reject::ORIG::Failed_Auth:",remoteip,remotehost,helohost.s,user.s,authcmds[i].text);
+ }
@@ -231,12 +241,12 @@
struct commands smtpcommands[] = {
{ "rcpt", smtp_rcpt, 0 }
, { "mail", smtp_mail, 0 }
-@@ -1063,7 +1080,7 @@
+@@ -1066,7 +1093,7 @@
, { "quit", smtp_quit, flush }
, { "helo", smtp_helo, flush }
, { "ehlo", smtp_ehlo, flush }
--@@ -408,8 +1220,11 @@
-+@@ -408,8 +1239,11 @@
+-@@ -408,8 +1223,11 @@
++@@ -408,8 +1252,11 @@
, { 0, err_unimpl, flush }
} ;