[Mimedefang] whitelist question

Paul Murphy pmurphy at ionixpharma.com
Tue Jan 18 11:32:30 EST 2005


> I am using Mimedefang along with spamassassin. I have a rule in my
> mimedefang-filter that is bouncing one of my customers mailing list
> e-mails. I'ld like to whitelist just this one mailing list. How do I
> whitelist in Mimedefang? Or do I do the whitelisting  in Spamassassin
> instead?

If your filter is bouncing the message as SPAM, then you can whitelist it in
SpamAssassin using the whitelist_from directive in your SpamAssassin conf file.

If however it is being blocked because your filter doesn't like the attachment
types sent to it, or for some other reason calls action_discard or
action_bounce, then you have to code the exceptions into your filter - see the
example below.

Note however that this will literally allow ALL mail through from the
whitelisted addresses - if you still want to scan for spam and viruses, you'll
need to structure your filter_end to do the necessary exception check around
whatever bits you don't want to include for whitelisted addresses.

If you want to whitelist based on recipient, this will also do so.

At the top of your filter:
$IncomingWhitelist{'example.com'} = 1;
$IncomingWhitelist{'sender at whitelisted.com'} = 1;

At the top of filter_recipient:
  my @senderparts = split(/@/, $sender);
  my $senderdom = $senderparts[1];
  $senderdom =~ s/[<>]//g;
  if (
       (exists $IncomingWhitelist{lc($sender)}) ||
       (exists $IncomingWhitelist{lc($senderdom)}) ||
	 (exists $IncomingWhitelist{lc{$recipient}) )
    return ('ACCEPT_AND_NO_MORE_FILTERING', "ok");

Best Wishes,

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

Tel. 01223 433741
Fax. 01223 433788

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

More information about the MIMEDefang mailing list