[Mimedefang] bypass mimedefang or milter
Antoine Jacoutot
ajacoutot at dioranews.com
Wed Oct 15 06:57:53 EDT 2003
Mark wrote:
> You think it cannot possibly that simple. Well, it is. :)
Well, thank you, thank you and thank you again !
It works great :)
For everyone's information, here is what I added to the filter (whatch
out for line breaks):
use DB_File;
use Fcntl;
tie %drac, DB_File, '/usr/local/etc/dracd.db', O_RDONLY, 0440, $DB_BTREE;
sub filter_relay {
my($hostip, $hostname, $helo) = @_;
if ($hostip eq '127.0.0.1' or
$hostip eq '192.168.0.1' or
$drac{$hostip} or
$hostip =~ /^192\.168\.0\./) {
return ('ACCEPT_AND_NO_MORE_FILTERING', "ok");
}
return ('CONTINUE', "ok");
}
Now for everyone in my LAN or authorized to relay mail with drac,
mimedefang will skip the checks.
So nice :)
Regards.
Antoine
More information about the MIMEDefang
mailing list