On Fri, Aug 22, 2003 at 09:21:03AM -0700, Zachary Denison wrote:
> 
> Hi I am using qmailldap patch
> 
> qmail-ldap-1.03-20030801a.patch
> and
> smtp-auth-20030801.patch
> 
> Also as a seperate question - has anyone ported
> Russell Nelson's qmail-smtpd anti-exe file patch to
> work with qmail ldap?
> 

Russells patch is already in the 20030801a patch (SMTPEXECCHECK option).
The problem is, that ther is a bug in the code so you need to apply the
following patch after the 20030801a patch and rebuild qmail-smtpd.
Also don't forget to set the REJECTEXEC env var either via startup script
or via tcprules.

The filter is extremly effective. We have enabled it on our mail servers
and since then no customer complained about getting the virus.

-- 
:wq Claudio
Index: execcheck.c
===================================================================
RCS file: /home/cvs-qmail-ldap/CVS/qmail-ldap/execcheck.c,v
retrieving revision 1.1
diff -u -r1.1 execcheck.c
--- execcheck.c 30 Jul 2003 17:16:48 -0000      1.1
+++ execcheck.c 21 Aug 2003 08:57:57 -0000
@@ -52,7 +52,7 @@
 }
 
 void
-execcheck_put(struct qmail *qqt, char *ch)
+execcheck_put(struct qmail *qq, char *ch)
 {
        char *cp, *cpstart, *cpafter;
        unsigned int len;
@@ -101,8 +101,8 @@
                                        while (cp < cpafter &&
                                            (*cp == ' ' || *cp == '\t'))
                                                ++cp;
-                                       if (9 > cpafter - cp &&
-                                           case_diffb(cp, 9, "boundary=")) {
+                                       if (9 < cpafter - cp &&
+                                           case_diffb(cp, 9, "boundary=")==0) {
                                                cp += 9; /* after boundary= */
                                                if (cp < cpafter &&
                                                    *cp == '"') {
@@ -172,7 +172,7 @@
                                    !str_diffn(line.s,"TVouARsAA",9) ||
                                    !str_diffn(line.s,"TVrQAT8AA",9)) {
                                        flagexecutable = 1;
-                                       qmail_fail(&qqt);
+                                       qmail_fail(qq);
                                }
                        linespastheader = 2;
                }

Reply via email to