Sender notifications - disable? customize?

MRob mrobti at insiberia.net
Fri Dec 2 13:06:09 CET 2016


>> Does disabling $warn_offsite prevent ALL non-local notifications 
>> (based on
>> $mynetworks?)? Should I set it to undef to disable?
> 
> I wouldn't use warn_offsite, because it opens the door to backscatter. 
> I'd
> leave it at its default, effectively disabling offsite warnings.
> 
> What I'd do instead is set @mynetworks and @local_domains_maps. The 
> first
> defines hosts (IPs/networks in CIDR) you know to be internal (from 
> internal)
> and the second defines a list of domains you receive messages for (to 
> internal).
> 
> Once these have been set amavis can tell all directions, e.g. "from 
> external"
> != "from internal", *and* it will begin to send notifications.
> 
> It will also notify potential senders of banned files if you set
> $warnbannedsender.
> 
> 	In case you are able to read and understand German you may read more 
> about
> 	this in my blog:
> https://sys4.de/en/blog/2013/02/15/e-mail-content-policies-mit-amavis/
> 
> 
>> Does $warnbannedsender control the notifications I am seeing?
> 
> It does.
> 
> 
> 
>> > > - I cannot find a way to disable them - tried setting these all to 0
>> > > but no
>> > > luck: $warnbadhsender $warnbannedsender $warn_offsite
>> > >
>> > > I tried setting to undef instead of 0, but warning/notices are still
>> > > sent
>> > > out by amavis.  So I appear to have a problem with these settings
>> > > being
>> > > overridden somewhere else(?)(or not understanding the right settings
>> > > to use)

The problem here turned out to be that "$final_banned_destiny = 
D_BOUNCE" was overriding $warnbannedsender

I changed it to D_DISCARD.

What is odd now is that setting "$warnbannedsender = 1" does work if I 
want to once again enable banned warnings, but setting "warnbannedsender 
=> 1" inside a policy bank does nothing (so as to only warn internal 
senders I wanted to enable the setting for ORIGINATING policy bank). To 
accomplish that goal, must I also override "final_banned_destiny" in the 
policy bank?

Indeed, doing so seemed to do the trick. Not sure what the difference 
between these two settings is supposed to be, why there are two of them 
-- ??


More information about the amavis-users mailing list