[Mimedefang] From Specific Address's

Kevin A. McGrail KMcGrail at PCCC.com
Fri Oct 21 11:23:25 EDT 2011


On 10/21/2011 10:55 AM, Les Mikesell wrote:
> On Fri, Oct 21, 2011 at 9:44 AM, Aaron Enders<aenders24 at comcast.net>  wrote:
>> You my friend are ingenious this worked perfectly the first time through, I
>> can't thank you enough. I do have one more piece to the puzzle I have a
>> question on...
>>
>> What filter part scans outgoing email? I would like to have all outgoing
>> emails sent to said domains copied also..
>>
> All mail going through the machine is scanned.  MimeDefang doesn't
> have a concept of 'direction'.
>
Aaron,

What he means is MD sees email and you have to write logic to determine 
if it's inbound or outbound.

However, for your case, I imagine you know the domain you want to 
archive so you could do loop in filter_end based on domain.  If that 
domain is handled on the same box, you'll need to check the file HEADERS 
line by line to see if there is a header match to prevent loops, etc.

    my ($recip);
    foreach $recip (@Recipients) {
       if ($recip =~ /\@domain\.com)>?$/i) {
         action_add_header("X-IMAHEADER","Testing");
         add_recipient('archive at somwhereelse.com');
         md_syslog('warning', "Preserving Email because of recipient: 
$recip");
       }
     }

regards,
KAM



More information about the MIMEDefang mailing list