amavis-user February 2013 archive
Main Archive Page > Month Archives  > amavis-user archives
amavis-user: Re: Notifications on banned files

Re: Notifications on banned files

From: Patrick Ben Koetter <p_at_nospam>
Date: Mon Feb 25 2013 - 21:01:23 GMT
To: amavis-users@amavis.org

* Michael Dukelsky <amavism@mail.ru>:
> Hi Patrick,
>
> On 22.02.2013 19:30, Patrick Ben Koetter wrote:
>
> ??>> I'd like a recipient to receive a notification of a banned
> ??>> file moved to the quarantine, if and only if the recipient
> ??>> is in my net. How do I do it?
> PK> Set @mynetworks to tell where your machines are:
> PK> @mynetworks = qw(
> PK> 127.0.0.0/8
> PK> ...
> PK> ); #
> PK> Set @local_domains_maps to tell amavis who your recipients are:
> PK> @local_domains_maps = (
> PK> ".$mydomain"
> PK> );
> PK> Tell amavis to notify recipients of banned file quarantine:
> PK> # Don't send notification to sender
> PK> $warnbannedsender = 0;
> PK> # Send notification to recipient
> PK> $warnbannedrecip = 1;
>
> Thank you very much, it works.
>
> Now I tried to send a notification to a sender from my net who has sent
> a message with a banned file.

Is the recipient in @local_domains_maps? If not, the recipient should _not_
get a notification unless you have deactivated $warn_offsite i.e. set it to 1.

> If I set
>
> $warnbannedsender = 1;
>
> then both sender in my net and recipient out of my net get
> notifications. And I do not want the recipient out of my net to get a
> notification.
>
> I tried also to set
>
> $policy_bank{'ORIGINATING'} = {
> originating => 1,
> ...
> warnbannedsender => 1,
> ...
> }
>
> But it looks like the policy bank settings do not influence amavisd. How
> do I send a notification to a sender only if he is from my net?

The setting is okay and it should work. How to you route messages into the
policy_bank ORIGINATING? Maybe the problem is the routing and not the policy.

p@rick

-- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich