On Thu, Jul 06, 2006 at 11:13:00AM -0400, Zilber, Alexey wrote:
> BIGBROTHER and qmailtap are not the same thing.  In fact, qmailtap
> should replace BIGBROTHER.  It's pretty archaic when you compare with
> qmailtap functionality.
> 

The do exactly the same thing. The only difference is that qmailtap uses
regex to match addresses. I will not add any regex support into
qmail-ldap. regex is a busted concept and there is no bug free
implementation on the planet.

Btw. sometimes less is more. BIGBROTHER is way faster than qmailtap if you
have larger list because it is able to use constmap instead of a linear
search.

And for those of you that have the desire to capture all mails to a
specific domain here is a diff that allows the usual "@domain.com" syntax
in control/bigbrother.

>  > -----Original Message-----
>  > From: Rajkumar S. [mailto:[EMAIL PROTECTED]
>  > Sent: Thursday, July 06, 2006 9:56 AM
>  > To: qmail-ldap
>  > Subject: Re: Intagration of 2 inter7 qmail patches
>  > 
>  > Quoting Claudio Jeker <[EMAIL PROTECTED]>:
>  > 
>  > >> 1. http://www.inter7.com/?page=qmailtap
>  > >
>  > > This is known as BIGBROTHER and control/bigbrother in qmail-ldap.
>  > 
>  > Does BigBrother support regex like
>  > 
>  > [EMAIL PROTECTED]:[EMAIL PROTECTED]
>  > [EMAIL PROTECTED]:[EMAIL PROTECTED]
>  > 
>  > Writing one line for every mail address is a pain :)
>  > 
>  > > I think we may support this in the next release because of simscan
>  > (even
>  > > though I would really like to make smtp-vilter work together with
>  > > qmail-ldap but that's a different story).
>  > 
>  > Thanks!
>  > 
>  > raj
> 

-- 
:wq Claudio

Index: qmail-queue.c
===================================================================
RCS file: /home/cvs-djbware/CVS/qmail-ldap/qmail-queue.c,v
retrieving revision 1.5
diff -u -p -r1.5 qmail-queue.c
--- qmail-queue.c       28 Oct 2003 16:37:57 -0000      1.5
+++ qmail-queue.c       6 Jul 2006 15:02:19 -0000
@@ -173,7 +173,7 @@ int main()
  unsigned int len;
  char ch;
 #ifdef BIGBROTHER
- unsigned int xlen, n;
+ unsigned int xlen, n, j;
  char *x;
  const char *b;
 #endif
@@ -295,12 +295,14 @@ int main()
    do
     {
      n = byte_chr(x,xlen,0);
-     if ((b = constmap(&mapbb, x, n))) {
-       if (*b) {
-         if (substdio_bput(&ssout,"T", 1) == -1) die_write();
-         if (substdio_bputs(&ssout,b) == -1) die_write();
-         if (substdio_bput(&ssout,"",1) == -1) die_write();
-       }
+     if (!(b = constmap(&mapbb, x, n))) {
+       if ((j = byte_rchr(x, n, '@')) < n)
+         b = constmap(&mapbb, x + j, n - j);
+     }  
+     if (b && *b) {
+       if (substdio_bput(&ssout,"T", 1) == -1) die_write();
+       if (substdio_bputs(&ssout,b) == -1) die_write();
+       if (substdio_bput(&ssout,"",1) == -1) die_write();
      }
      if (n++ >= xlen) break;
      x += n; xlen -= n;

Reply via email to