MailTools v2.* breaks MailScanner

On servers that are running the perl modules that are a part of MailTools, MailScanner breaks with the recently released v2.*. The errors you will see when starting MailScanner look like this:

Variable “$FIELD_NAME” is not imported at /usr/mailscanner/lib/MailScanner/Message.pm line 6907.Variable “$FIELD_NAME” is not imported at /usr/mailscanner/lib/MailScanner/Message.pm line 6910.Global symbol “$FIELD_NAME” requires explicit package name at /usr/mailscanner/lib/MailScanner/Message.pm line 6907.Global symbol “$FIELD_NAME” requires explicit package name at /usr/mailscanner/lib/MailScanner/Message.pm line 6910.Compilation failed in require at /usr/mailscanner/bin/MailScanner line 79.BEGIN failed–compilation aborted at /usr/mailscanner/bin/MailScanner line 79.

You can determine the module version using:

perl -MMail::Header -e ‘print “$Mail::Header::VERSION\n”‘

To fix this you need to downgrade MailTools to v1.77:

wget http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MailTools-1.77.tar.gztar -xzf MailTools-1.77.tar.gzcd MailTools-1.77perl Makefile.PL makemake installcd ..rm -Rfv MailTools-1.77*