diff options
author | Renato Botelho <garga@FreeBSD.org> | 2006-06-08 23:47:10 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2006-06-08 23:47:10 +0000 |
commit | 32447622f7bd3a0886d8cd707cf4666ed9701495 (patch) | |
tree | a66291f187df5e6d56a53b722548dc19b9ee3e5a /mail/qmail | |
parent | 9e4382fcfb61278b8a99b4b9d9ea8aea3ccb6d57 (diff) | |
download | ports-32447622f7bd3a0886d8cd707cf4666ed9701495.tar.gz ports-32447622f7bd3a0886d8cd707cf4666ed9701495.zip |
Notes
Diffstat (limited to 'mail/qmail')
-rw-r--r-- | mail/qmail/Makefile | 3 | ||||
-rw-r--r-- | mail/qmail/files/extra-patch-spamcontrol-qmail-smtpd.c | 51 |
2 files changed, 53 insertions, 1 deletions
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile index 1426a36662e2..826728232ca0 100644 --- a/mail/qmail/Makefile +++ b/mail/qmail/Makefile @@ -494,7 +494,8 @@ post-patch: . for option in ${SELECTED_OPTIONS} @${ECHO_CMD} ${option} >> ${WRKSRC}/conf-spamcontrol . endfor - @cd ${WRKSRC} && ./install_spamcontrol.sh + @cd ${WRKSRC} && ./install_spamcontrol.sh && \ + ${PATCH} < ${FILESDIR}/extra-patch-spamcontrol-qmail-smtpd.c .elif defined(SLAVE_TLS) @${HEAD} -105 ${DISTDIR}/${DIST_SUBDIR}/qmail-1.03-tls-${TLS_PATCH_DATE}-renato.patch > \ ${WRKDIR}/TLS.readme diff --git a/mail/qmail/files/extra-patch-spamcontrol-qmail-smtpd.c b/mail/qmail/files/extra-patch-spamcontrol-qmail-smtpd.c new file mode 100644 index 000000000000..48676daf1d26 --- /dev/null +++ b/mail/qmail/files/extra-patch-spamcontrol-qmail-smtpd.c @@ -0,0 +1,51 @@ +--- qmail-smtpd.c.orig Sun Jun 4 18:50:11 2006 ++++ qmail-smtpd.c Sun Jun 4 18:54:15 2006 +@@ -129,6 +129,18 @@ + logs(s1,s2,s3,s4,s5,s6,s7); + return; + } ++void err_rbl(s1,s2,s3,s4,s5,s6,s7) char *s1, *s2, *s3, *s4, *s5, *s6, *s7; { ++ stralloc rblmessage = {0}; ++ ++ if (!stralloc_copys(&rblmessage,"553 sorry, your IP is listed on a RBL list ")) die_nomem(); ++ if (!stralloc_cats(&rblmessage,env_get("RBLMATCH"))) die_nomem(); ++ if (!stralloc_cats(&rblmessage," (#5.7.1)\r\n")) die_nomem(); ++ if (!stralloc_0(&rblmessage)) die_nomem(); ++ ++ out(rblmessage.s); ++ logs(s1,s2,s3,s4,s5,s6,s7); ++ return; ++ } + void err_brcptto(s1,s2,s3,s4,s5,s6,s7) char *s1, *s2, *s3, *s4, *s5, *s6, *s7; { + out("550 sorry, your envelope recipient is in my badrcptto list (#5.7.1)\r\n"); + logs(s1,s2,s3,s4,s5,s6,s7); +@@ -270,6 +282,8 @@ + + char *auth; + char *reqauth; ++char *rbl2smtpd; ++char *rblmatch; + int smtpauth = 0; + int seenauth = 0; + +@@ -388,6 +402,9 @@ + if(env_get("UCSPITLS")) starttls = 1; + if(starttls) reqttls = env_get("REQUIRETLS"); + ++ rbl2smtpd = env_get("RBL2SMTPD"); ++ rblmatch = env_get("RBLMATCH"); ++ + #ifdef RELAYMAILFROM + if (!relayclient) { + relaymailfromok = control_readfile(&relaymailfrom,"control/relaymailfrom",0); +@@ -910,6 +927,10 @@ + flagerrcpts++; + return; + } ++ if (!seenauth && rbl2smtpd && rblmatch && str_len(rblmatch) != 0) { ++ err_rbl("Reject::RBL::RBL_Listed:",protocol.s,remoteip,remotehost,helohost.s,mailfrom.s,addr.s); ++ return; ++ } + if (tarpitcount && flagerrcpts >= tarpitcount) { + err_rcpts("Reject::RCPT::Toomany_Rcptto:",protocol.s,remoteip,remotehost,helohost.s,mailfrom.s,addr.s); + return; |