Graeme,
> $interface_policy{'10025'} = 'DISCLAIMER';
> $policy_bank{'DISCLAIMER'} = {
> allow_disclaimers => 1,
> originating => 1
> };
> $altermime = '/usr/local/bin/altermime';
> @altermime_args_disclaimer =
> qw(--verbose
> --disclaimer=/etc/postfix/disclaimer.txt);
> $defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];
> My MTA is postfix, however when postfix routes a message to amavisd on
> localhost:10025, the disclaimer does not get added.
>
> If I telnet to localhost however, port 10025, and manually send the same
> message, the amavisd-new does add the disclaimer.
The same message (envelope, author)?
Make sure the following condition is met (from RELEASE_NOTES):
...and where any of the following addresses matches local domains:
author (2822.From) or sender (2822.Sender) or return path (2821.mail_from);
> Can anyone point out what I'm missing here - how can I make port 10025
> always add the disclaimer text.
Log would tell. Make sure the policy bank gets loaded (level 2 or higher):
...loaded policy bank "DISCLAIMER"
Next, look in the log (level 2 or higher) for:
mangling YES: disclaimer (orig: disclaimer), discl_allowed=1, <...> -> <...>
...
mangling by: disclaimer, <...>
program /usr/local/bin/altermime said: Attempting to add disclaimer\nDone.\n
mangling by altermime (disclaimer) done, new size: 362, orig 344 bytes
(search the log for: mangl|disclaim|defang)
> $defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];
Check the log that the message content type was CC_CLEAN (e.g. search the
log for ccat), otherwise the CC_CATCHALL entry of a %defang_maps_by_ccat
will not be reached - other entries taking precedence, such as CC_BADH,
CC_VIRUS, CC_SPAMMY, CC_UNCHECKED, ... (all but CC_CLEAN).
The default value of %defang_maps_by_ccat is:
%defang_maps_by_ccat = (
CC_VIRUS, sub { c('defang_virus') },
CC_BANNED, sub { c('defang_banned') },
CC_UNCHECKED, sub { c('defang_undecipherable') },
CC_SPAM, sub { c('defang_spam') },
CC_SPAMMY, sub { c('defang_spam') },
# CC_BADH.',3', 1, # NUL or CR character in header
# CC_BADH.',5', 1, # header line longer than 998 characters
# CC_BADH.',6', 1, # header field syntax error
CC_BADH, sub { c('defang_bad_header') },
);
You might want to add disclaimer to content types such as
CC_BADH and CC_UNCHECKED, perhaps also to CC_SPAMMY.
Either set each hash key individually:
$defang_maps_by_ccat{+CC_UNCHECKED} = [ 'disclaimer' ];
$defang_maps_by_ccat{+CC_BADH} = [ 'disclaimer' ];
$defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];
or replace the entire hash %defang_maps_by_ccat:
%defang_maps_by_ccat = (
CC_VIRUS, sub { c('defang_virus') },
CC_BANNED, sub { c('defang_banned') },
CC_SPAM, sub { c('defang_spam') },
CC_SPAMMY, sub { c('defang_spam') },
CC_CATCHALL, [ 'disclaimer' ],
);
If you won't be able to resolve the problem, make the log (level 5)
available for inspection.
Mark
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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/