Sven,
> I managed adding a disclaimer to any outgoing mail with altermime.
> Now I want to do a second thing:
> Any *incoming* mail wich is classified as spam should be attached to a
> spamreport mail. This worked before upgrading to amavisd-new 2.5.0:
> The user got a mail wich was telling him that a mail was classified as
> spam, the original mail was attached.
>
> I found out that amavisd-new tries to use altermime or anomy-sanitzer
> for defanging mails if it is installed.
True, as documented in release notes:
If there is more than one mangling code option available, the result
of a %defang_maps_by_ccat can choose between them by returning one of
the following strings, the selection can depend on mail content type
and on by-recipient lookups if needed:
'anomy' chooses Anomy Sanitizer (if $enable_anomy_sanitizer is true);
'altermime' chooses a program whose path is $altermime (if found);
'attach' chooses the traditional amavisd-new defanging method
which pushes an original mail message to an attachment;
'null' for testing purposes - doesn't modify mail body, but
pretends it does (in logging and mail header);
other non-empty and non-zero value automatically choose one
of the above options depending on what is available;
at least the 'attach' is always available;
an empty, zero or undef value disables mail body modifications;
"other non-empty and non-zero value" includes a value such as 1
(such as if $defang_spam is set to 1)
> If one does not want altermime this has to be configured explicitly.
True, the:
$defang_spam = 'attach';
should suffice.
> I did set up a corresponding
> ruleset for my domain but it doesn't work. Can someone point me into the
> right direction? This is my rule for defanging incoming mails:
>
> $defang_maps_by_ccat{+CC_SPAM} = [
> { # a per-recipient hash lookup table
> '.dynamik.sytes.net' => 'attach',
> },
> $defang_spam, # fallback to old style setting if no match above
> ];
Appears alright.
Does recipient address match the '.dynamik.sytes.net' ?
Are there any other assignments to a %defang_maps_by_ccat hash?
> As far as I understood the docs, amavisd should use the old "attach"
> method to defang my mail if it is classified as spam. But it doesn't.
> Instead it tries to use altermime wich I dont want.
> Mails get only defanged if I rename altermime so amavisd can not find it.
Please check the log. At log level 2 the following log entry
should be most revealing:
amavis[31375]: (31375-07) mangling YES:
attach (orig: attach), discl_allowed=1, <...> -> <...>
more details appear at higher log levels.
You may send me a log privately to save bandwidth or protect privacy.
Mark
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/