[Mimedefang] HDRS question
J.D. Bronson
jbronson at wixb.com
Wed Apr 7 19:56:36 EDT 2004
I want to add a disclaimer only to outgoing email. This is working fine.
However, if email is sent back and forth from in -> out -> in -> out
I dont want the disclaimer added EACH time...so I
added 'X-Disclaimer-Added' header (works fine) and then wanted a way to
check to see if this header exists and if it does DO NOT ADD THE DISCLAIMER
again.
here is the relevant part of my filter (its at the end of
mimedefang-filter)...what am i doing wrong? - the disclaimer keeps getting
added to each email that leaves my network whether the 'X-header' is there
or not....
open(HDRS, "<HEADERS");
$count = 0;
while(<HDRS>) {
$count++ if /^X-Disclaimer-Added:/;
}
close(HDRS);
for ($i=1; $i <= $count; $i++) {
return 0;
}
if ($RelayAddr =~ "^192\.168\.10") {
append_text_boilerplate($entity, $boilerplate, 0);
action_add_header('X-Disclaimer-Added', "YES");
}
}
Thanks in advance for any pointers :)
--
J.D. Bronson
Aurora Health Care // Information Services // Milwaukee, WI USA
Office: 414.978.8282 // Email: jd at aurora.org // Pager: 414.314.8282
** DISCLAIMER **
Per Anti-Virus Policy, this e-email has been scanned for viruses.
Scanned clean by F-PROT ANTIVIRUS 4.4.1 - http://www.f-prot.com
More information about the MIMEDefang
mailing list