Hello everyone :)

I can't configure amavis (amavisd-new-2.6.5) to spam filtering all outgoing 
mails and only the out, not the in.

I work with policy_bank because I have different rules depending on the port.

I've SpamAssassin on the same server, incoming emails come they are analyzed by 
SpamAssassin then they are sent to amavis (same server, port 10032).
That work without problem, and now I would check the outgoing mail with 
SpamAssing in the same time with amavis.

I've make a policy_bank, postfix send the mail direct at amavis on the port 
10038, and I would make the spam and virus check.
But my problem, amavis does not check the outgoing spam...

If I update my "15-content_filter_mode" an uncomment the 2 line 
"@bypass_spam_checks_maps", amavis check spams on the port 10032 and remove all 
SpamAssassin header.
I've try to put "bypass_spam_checks_maps" on my policy_bank 
"IN_VIRUS_ONLY_CHECK" but, the spamassin header are removed...

I would just, for a incoming mail, that amavis just check virus, not remove 
header puted by SpamAssassin on the previous independant check...

Thank for your help,
Nath

My policy_bank for incoming mail on port 10032:
-----------------------------------------------
$interface_policy{'10032'} = 'IN_VIRUS_ONLY_CHECK';
$policy_bank{'IN_VIRUS_ONLY_CHECK'} = {
  forward_method => 'smtp:[172.16.2.252]:10025',
  final_virus_destiny      => D_PASS,
  final_banned_destiny     => D_PASS,
  final_spam_destiny       => D_PASS,
  final_bad_header_destiny => D_PASS,
  X_HEADER_LINE => 'TEST IN VIRUS ONLY CHECK',
  notify_virus_recips_templ => 
read_text("/etc/amavis/fr_FR/notification_destinataire.txt"),
  warnvirusrecip_maps => 0,
  warn_offsite => 1,
  warnvirussender => 0,
  virus_admin_maps => undef,
  newvirus_admin_maps => undef,
  bypass_spam_checks_maps => [1],
  bypass_banned_checks_maps => [1],
  bypass_header_checks_maps => [1],
  spam_lovers_maps => [1],
  remove_existing_x_scanned_headers => 0,
  remove_existing_spam_headers => 0,
};

My policy_bank for outgoing mail on port 10038:
-----------------------------------------------
$interface_policy{'10038'} = 'OUT_VIRUS_SPAM_CHECK';
$policy_bank{'OUT_VIRUS_SPAM_CHECK'} = {
  forward_method => 'smtp:[172.16.2.252]:10026',
  originating => 1
  final_virus_destiny => D_BOUNCE,
  final_banned_destiny => D_BOUNCE,
  final_spam_destiny => D_BOUNCE,
  final_bad_header_destiny => D_PASS,
  X_HEADER_LINE => 'TEST OUT VIRUS AND SPAM CHECK',
  notify_virus_admin_templ => 
read_text("/etc/amavis/fr_FR/notification_administrateur.txt"),
  notify_spam_admin_templ => 
read_text("/etc/amavis/fr_FR/notification_administrateur_spam.txt"),
  notify_spam_sender_templ => 
read_text("/etc/amavis/fr_FR/notification_expediteur_spam.txt"),
  warnspamsender => 0, #Notif Sender: warnspamsender => 1
};

All files have the default config and that's my 15-content_filter_mode:
-----------------------------------------------------------------------
use strict;
@bypass_virus_checks_maps = (
   \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
@bypass_spam_checks_maps = (
   \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
1; 

Reply via email to