[Mimedefang] Filters and Global Variables

John Rudd john at rudd.cc
Wed Sep 14 03:51:02 EDT 2005


Does the same child get called for all filter* subroutines?

For example, if I define a global variable outside of any subroutines, 
and then in filter_begin I clear it ... then add some values to it in 
filter, will I then be able to read it in filter_end?

I'm still thinking about how to do "virus scan in filter_begin, but 
replace the message body in filter_end".  I was thinking I could use 
two global variables where filter_begin clears them, then if there's a 
virus, it sets one of them to $VirusName.  If that variable is set, 
then filter and filter_multipart will drop all attachments and add 
their names to the second variable.  Last, filter_end will replace the 
message body with a message explaining what happened, including the 
list of attachments that were removed.

Does that seem reasonable?




More information about the MIMEDefang mailing list