[Mimedefang] MIMEDEFANG to check ONLY INCOMING MAILS ?
Marco Supino
marco at sd.com
Mon Nov 22 09:16:44 EST 2004
put this in your mime-filter :
***********
use Socket;
sub filter_relay ($$) {
my ($hostip, $hostname) = @_;
md_syslog('debug', "RELAY: <$hostip> <$hostname>");
my $addr = '';
my $network_string = '';
my $mask_string = '';
# List networks that should be exempt from all filtering by
# putting their network/mask pairs into the exempt_subnets
# associative array. (Follow the example for the loopback.)
my %exempt_subnets = (
'127.0.0.0', '255.0.0.0', # loopback
'192.168.0.0', '255.255.0.0' # my internal net
);
# If the address of the connecting client falls within one of
# the subnets defined by %exempt_subnets, then bypass all
# further filtering.
$addr = inet_aton $hostip;
while (($network_string, $mask_string) = each %exempt_subnets) {
my $network = inet_aton $network_string;
my $mask = inet_aton $mask_string;
if (($addr & $mask) eq $network) {
# action_delete_all_headers("Received");
return ('ACCEPT_AND_NO_MORE_FILTERING', 'ok');
}
}
# The client isn't in an exempt subnet; filtering should
# continue.
return ('CONTINUE', 'ok');
}
***********
and run the miltiplexor with -r (so filter_relay is used), and , add
your outgoing relay to the list of %exempt_subnets.
Marco.
hitete at free.fr wrote:
> How to force mimedefang to check mails only on incoming mails ?.
> I just realized that both incoming and outgoing mails are checked and I'd like
> only incoming mails to be checked.
>
>
> /Hitet
> _______________________________________________
> Visit http://www.mimedefang.org and http://www.canit.ca
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
>
More information about the MIMEDefang
mailing list