On Mar 20, 2013, at 4:04 PM, David F. Skoll wrote: > On Wed, 20 Mar 2013 15:52:02 +0100 > Lars Sorensen <[email protected]> wrote: > > ===================================================== > sub filter_begin { > open (IN, "<./COMMANDS"); > while(<IN>) { > if(/R<email\@mydomain\.com>/i) { > action_delete_all_headers("X-Header-to-delete"); > last; > } > } > close(IN); > } > ===================================================== > > Wow, that's going about it the hard way! You should NEVER have to read > ./COMMANDS yourself. That can be replaced with one line: > > action_delete_all_headers('X-Header-to-delete') if grep { > /<email\@mydomain\.com>/i } @Recipients; > >> Same thing for the "remove_redundant_html_parts($entity);" >> The problem I was having, was looking for the recipient in the >> HEADERS as opposed to the COMMANDS file, thereby missing when when >> Bcc's and list email recipients was specified. > > Use the @Recipients array to get the envelope recipients. > > Regards, > > David.
David, Yeah, that looks a lot cleaner! ;) Thank you very much for the help. -Lars _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

