Chris, > > * embperl.c: Detect if user opens file >descriptors > inside his/her filter. If so, log a loud >and nasty > warning that such code should be >moved to > filter_initialize. > > Why is it a problem to do this outside of > filter_initialize?
The design of MIMEDefang is such that you cannot guarantee that the slave which started processing your message is the same as the slave which finishes the processing, as each part of the SMTP process could be passed to a different slave. If you have enabled checking at all stages, there could be different slaves for filter_relay, filter_sender, filter_recipient, one filter() per entity, and then also a filter_end call. As slaves are reaped when they have processed a configured number of requests to ensure memory usage is limited, "your" slave could terminate after the first part of the message, and a different slave could take over. If the file descriptor use is completely local to the procedure (i.e. you open a file, write to it, then close it), then your use is probably safe (subject to locking & race conditions). If you open it in filter_sender, then attempt to read from it in filter_recipient, then you are digging a very large hole for yourself - in many cases, it will work, especially on lightly loaded systems, but you will then find it failing with obscure side effects or untraceable problems when the load rises. Best Wishes, Paul. __________________________________________________ Paul Murphy Head of Informatics Ionix Pharmaceuticals Ltd 418 Science Park, Cambridge, CB4 0PA Tel. 01223 433741 Fax. 01223 433788 _______________________________________________________________________ DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please contact the sender or the Ionix IT Helpdesk on +44 (0) 1223 433741 _______________________________________________________________________
_______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

