[Mimedefang] bypass mimedefang or milter

Mark admin at asarian-host.net
Wed Oct 15 06:22:45 EDT 2003


----- Original Message ----- 
From: "Antoine Jacoutot" <ajacoutot at dioranews.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Wednesday, October 15, 2003 12:14 PM
Subject: Re: [Mimedefang] bypass mimedefang or milter


> > If so, it uses DB_File.  You could modify the mimedefang-filter to
> > use DB_file, tie the popauth.db to a hash and do logic to see if the
> > sender's IP is in the DB_file prior to checking viruses/spam.
>
> I'm using drac, it uses a DB file: /usr/local/etc/dracd.db
> Unfortunately, I don't really know PERL so I don't feel like
> changing the mimedefang rules myself without some examples.


That should not prove too difficult. Fortunately, using DB_file is real
easy. :)

use DB_File;
use Fcntl;

tie %drac, DB_File, '/usr/local/etc/dracd.db', O_RDONLY, 0440, $DB_BTREE;

Because of the tie, now you can simply test like this:

if ($drac{$hostip}) {
    return ('ACCEPT_AND_NO_MORE_FILTERING', "ok");
}

You think it cannot possibly that simple. Well, it is. :)

- Mark



More information about the MIMEDefang mailing list