Richard,

I use a Perl hash to hold details of all whitelisted addresses, and check this
before calls to contentious parts of the filter, e.g.:

At the top of the filter (i.e. globally):

# Addresses to allow regardless of origin
$IncomingWhitelist{'[EMAIL PROTECTED]'} = 1;
$IncomingWhitelist{'[EMAIL PROTECTED]'} = 1;

Then in the relevant parts of the filter (in this case :

# skip greylisting for selected users
  my @senderparts = split(/@/, $Sender);     
  my $senderdom = $senderparts[1];
  $senderdom =~ s/[<>]//g;   

  #md_syslog('debug',"Whitelist check - $Sender,$senderdom,$ip");
  if (
       (exists $IncomingWhitelist{lc($sender)}) ||
       (exists $IncomingWhitelist{lc($senderdom)}) ||
       ( exists $LocalRelayAddrs{$ip}) )                  
    {
    md_syslog('info',"WhiteList - skip greylisting check,
Sender=$Sender,Dom=$senderdom, Addr=$ip");
    return ('CONTINUE', "ok");
    }

Or:

    if ( (!exists $IncomingWhitelist{lc($Sender)}) && 
          (filter_bad_filename($entity)) ) {
        md_graphdefang_log('bad_filename', $fname, $type);
        action_notify_administrator("A file called $fname from $Sender was
removed from an e-mail with subject | $subject | - quarantined.\n\n");

This has the advantage of keeping in virus scanning, SPAM filtering, or whatever
while allowing some addresses to skip some parts.

In addition, my ZIP file handling is fairly involved, as the only way to be sure
that a zip file is "safe" is to examine the contents in an intelligent manner.
See the attached code from "filter()" for details.

Best Wishes,

Paul.
__________________________________________________
Paul Murphy
Head of Informatics
Ionix Pharmaceuticals Ltd
418 Science Park, Cambridge, CB4 0PA

Tel. 01223 433741
Fax. 01223 433788

_______________________________________________________________________
DISCLAIMER:
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to which they
are addressed.  If you have received this email in error please contact
the sender or the Ionix IT Helpdesk on +44 (0) 1223 433741
_______________________________________________________________________ 

Attachment: zip_check.pl
Description: zip_check.pl

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to