[Mimedefang] regarding varibles lifetime(scope) in mimedefang-filter

vinita batra batra.vinita at gmail.com
Fri Jan 18 01:35:45 EST 2008


Hi,
I am using mimedefang filter for some processing on incoming mail.
Actually i want to know if i set some vatriables in filter_begin and
performs operation on that variable in filter() then those variables
will be reinitialized for each incoming mail or not?

For example:
if i decalre some variable say count=0 in filter_begin().
then suppose filter() does count++; and accesses it at the end of filter()


Now suppose i send one mail then it will be processed by mimedefang filter
so filter_begin will be exceuted and will set count=0;
and when filter comes to count++ it will make count =1;

Now before count is accessed by filter (in the end of filter),
suppose i send another mail
so again filter_begin() will be exceuted and it will set the count=0;

suppose now the filter()called by first mail reaches at the end of
procedure and accesses the count variable. then at this time,
 filter() will see count=1 or count=0?


Thanks and Regards,
Vinita Batra



More information about the MIMEDefang mailing list