Notify Sender when a virus is detected

Damien Robinet damien at robinet.net
Mon May 23 19:35:40 CEST 2011


Hi All,

I'm looking how to send notification to the sender when a virus is detected.

Here is my architecture:
FRONTAL (Server Postfix) => BACKEND VIRUS (Postfix + Amavis) =>
BACKEND SMTP (Postfix)

I work with rules (policy). When a customer sends an email, postfix
sending the mail to amavis on a specific port.
$interface_policy{'10035'} = 'MAIL_FOR_SMTP_OUT';
$policy_bank{'MAIL_FOR_SMTP_OUT'} = {
  forward_method => 'smtp:[IP.SMTP.OUT]:10026',
  bypass_spam_checks_maps => [1],
  bypass_banned_checks_maps => [1],
  final_virus_destiny => D_BOUNCE,
  final_banned_destiny => D_BOUNCE,
  final_spam_destiny => D_BOUNCE,
  final_bad_header_destiny => D_BOUNCE,
  notify_virus_admin_templ =>
read_text("/etc/amavis/en_US/template-virus-admin.txt"),
  notify_sender_templ =>
read_text("/etc/amavis/en_US/template-virus-sender.txt"),
  warnvirussender => [1],
  warnspamsender => [1],
  warnbannedsender => [1],
  warnbadhsender => [1],
  warn_offsite => [1],
  warnvirusrecip => undef,
  warnvirusrecip_maps => undef,
  warnsender_by_ccat => [1],
  originating => [1],
};

I can inform the administrator but not the sender.
When the mail comes out of my network, I would notify the sender  that
his mail was blocked.

Can you help me? I do not understand why amavis does not prevent the
sender, but can prevents the admin.

Bests Regards,
Damien


More information about the amavis-users mailing list