defang_spam not working

Mark Martinec Mark.Martinec+amavis at ijs.si
Mon Feb 20 15:15:49 CET 2012


Steve,

> alterMIME v0.3.11 (November-2008) by Paul L Daniels -
> amavisd-new-2.7.0 (20110701)
> This is perl 5, version 14, subversion 2 (v5.14.2) built for amd64-freebsd
> FreeBSD untrustedhost.example.com 9.0-RELEASE FreeBSD 9.0-RELEASE
> 
> To try and help resolve this issue I've applied your attached patch,
> re-enabled altermime and sent a couple of test messages though but
> unfortunately the problem persists. The email arrives but is not defanged
> when altermime is enabled.
> 
> Please find attached sanitized amavisd logs of two "/usr/local/sbin/amavisd
> debug" sessions (one with altermime enabled, one with altermime disabled)
> and the emails that arrived.

Thanks for applying the patch and for the log.
This now indicates that altermime was invoked successfully:

(21760-01) mangling by: 1, <test at example.com>
(21760-01) run_command: [21792] /usr/local/bin/altermime
  --input=/var/amavis/tmp/amavis-20120../email-repl.txt
  --verbose --removeall </dev/null 2>&1
(21760-01) collect_results from [21792] (/usr/local/bin/altermime),
  0 bytes, (limit 16384)
(21760-01) mangling by altermime (1) done, new size: 613, orig 626 bytes
(21760-01) mail body mangling in effect, 

So altermime did what it was told (--removeall = Remove all attachments).
In case of this simple test message with no attachments, the result was
no different from the original message. Altermime has some other command
line options, you can tweak the @altermime_args_defang config setting,
its default is: @altermime_args_defang = qw(--verbose --removeall);

It seems you were expecting the defanging to insert the SpamAssassin
report into a spam message, and push it to an attachment.
This is what the simple defanging does ($defang_spam = 1;  or
the more explicit: $defang_spam = 'attach' ).

Altermime and Anomy sanitizer have their own ideas on what
constitutes 'defanging', and they do not mimic the simple 'attach'
method.

  Mark


More information about the amavis-users mailing list