[Mimedefang] use strict

Kenneth Porter shiva at sewingwitch.com
Wed Apr 13 20:26:37 EDT 2005


--On Wednesday, April 13, 2005 4:29 PM -0700 John Nemeth 
<jnemeth at victoria.tc.ca> wrote:

>      I was thinking of sticking 'use strict;' in my filter in order to
> make sure that it is written cleanly and is less likely to have bugs (I
> realise that 'use strict;' is not a panacea).  Is this likely to cause
> any problems with mimedefang.pl?

Good question. I just discovered a bug in my filter because I'd failed to 
escape an "@" in a regex (eg. "if ($Sender =~ /@mydomain\.com/)"). It was 
matching on every .com domain. (My editor failed to catch it because it 
wasn't coloring the @mydomain as an interpolated variable, and nothing 
warned that it was undeclared with "my". The next rev of my editor will 
have that patched.)

In addition to "use strict", does it make sense to use "-wT"? (Presumably 
this would need to be in mimedefang.pl.) Could a hostile sender effect a 
shell escape in a poorly-written filter?



More information about the MIMEDefang mailing list