Re: [Exim] dnslists acl wishlist

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Wakko Warner
Datum:  
To: exim-users
Betreff: Re: [Exim] dnslists acl wishlist
> > I've been looking at RBLs and notice some use different A records depending
> > on the type of block they do.  Most of the ones I come across I'd like to
> > block all but 1 type.  For instance:
> >     dnslists = dnsbl.sorbs.net!=127.0.0.8

> >
> > What do others thing of this? (I'm willing to code it if I can understand
> > the code well enough)
>
> I can see this getting complicated.


Wasn't complicated at all. The format for this is not as above, it's more
like:
dnslists = dnsbl.sorbs.net=!127.0.0.8

Why did I choose this way? It was easier to code. Plus it seems to keep in
line with the way exim handles lists. (IE: hosts=!1.2.3.4)

The one thing about this is the fact that !127.0.0.8,127.0.0.9 does not mean
"(not 127.0.0.8) and 127.0.0.9", it means "not (127.0.0.8 or 127.0.0.9)"

> Dr. Andrew C. Aitchison        Computer Officer, DPMMS, Cambridge
> A.C.Aitchison@???    http://www.dpmms.cam.ac.uk/~werdna


Patch:
--- verify.c-orig    Mon May 12 09:39:23 2003
+++ verify.c    Wed May 28 21:38:39 2003
@@ -2210,7 +2210,13 @@
       uschar ip[46];
       uschar *ptr = iplist;
       dns_address *da = NULL;
+      BOOL invert_result = FALSE;


+      if (*ptr == '!')
+        {
+        invert_result = TRUE;
+        ptr++;
+        }
       while (string_nextinlist(&ptr, &ipsep, ip, sizeof(ip)) != NULL)
         {
         for (da = cb->rhs; da != NULL; da = da->next)
@@ -2222,7 +2228,12 @@
       behave as if the DNSBL lookup had not succeeded, i.e. the host is
       not on the list. */


-      if (da == NULL)
+#if 0
+      if ((da == NULL && invert_result == FALSE) ||
+          (da != NULL && invert_result == TRUE))
+#else
+      if (invert_result == (da == NULL ? FALSE : TRUE))
+#endif
         {
         HDEBUG(D_dnsbl)
       {


--
Lab tests show that use of micro$oft causes cancer in lab animals