[Mimedefang] mimedefang-filter Help
    Patrick Morris 
    trick at adonis.net
       
    Fri Apr 30 14:44:52 EDT 2004
    
    
  
After several failed attempts, I'm looking for some suggestions on doing 
something I'm having a heck of a time with...
I'm trying to modify my mimedefang-filter to meet some monitoring 
requirements.  Basically, the goal here is:
1. If an e-mail comes from a pre-defined domain or address, send it to 
one "monitoring" address.
2. If an e-mail comes from an address other than those pre-defined, send 
it to a different address.
Here's what my current attempt looks like, and right now it's sitting in 
"filter_begin."  I get a "filter timed out" message when I activate it.  
Any help would be greatly appreciated -- As usual, they want this *now*, 
and didn't tell me about it until yesterday afternoon:
    $privileged_addrs = 
'(domain1\.com|domain2\.com|domain3\.com|person1 at here\.com|person2 at here\.com)';
    $re = '.*' . $privileged_addrs . '$';
    $is_privileged = ((re_match($Sender, $re)) | (re_match($Recipient, 
$re)));
    if ($is_privileged) {
        add_recipient('address1 at monitoring.service.com');
    }
    else {
        add_recipient('address2 at monitoring.service.com');
    }
    
    
More information about the MIMEDefang
mailing list