[Mimedefang] Exempting +nodefang addresses from defanging

Jim McCullars jim at info.uah.edu
Fri Apr 25 22:48:00 EDT 2003


On Fri, 25 Apr 2003, Jeffrey Goldberg wrote:

>    How do I tinker with and test mimedefang-filter.pl
>    without breaking mail delivery while testing?

   Very carefully :-)

   Seriously, about the best advice I can give is to make your changes
very gradually, and when you exit your editor, immediately run

	mimedefang.pl -test

That will tell you if you have any syntax errors in your perl code.  And
on a busy mail server, you run the risk of having one of your slave
processes getting recycled before you have a chance to fix it.  You might
even want to consider making a backup copy of your working
mimedefang-filter file so that you can restore it immediately if you have
problems.  If you don't have any syntax errors, you should put the new
rules file in place (by doing a reread command) and then watch your syslog
for signs of trouble.

>    scanning in the future.  My gut feeling is that I should still have
>    the "+nodefang" addresses subject to SA and virus scanning.  This, I
>    suppose, adds to the complication of my first question ("where do I
>    put the exemption code?")

   If you are going to run SA and virus checking, then what exactly do you
want to exempt the +nodefang users from?  The bad extensions check?  If
that's the case, then what I would recommend you try is this:  In
filter_begin, parse your recipient list for any that are not +nodefang
users.  If any are not, you will have to stream_by_recipient.  If all are,
then set some variable (maybe call it $no_defang) that you can test for in
filter (and be sure it is unset before the test, or you will get the
result of a previous operation).  Then in filter, just don't call the bad
extensions check if $no_defang is set.

> Also I'd welcome comments on the wisdom of this sort of policy.  It makes

   I don't like it, but being the email administrator for a college
campus, I don't live in the "real world".  :-)




More information about the MIMEDefang mailing list