Sender notifications - disable? customize?
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.
> leave it at its default, effectively disabling offsite warnings.
> What I'd do instead is set @mynetworks and @local_domains_maps. The
> defines hosts (IPs/networks in CIDR) you know to be internal (from
> and the second defines a list of domains you receive messages for (to
> Once these have been set amavis can tell all directions, e.g. "from
> != "from internal", *and* it will begin to send notifications.
> It will also notify potential senders of banned files if you set
> In case you are able to read and understand German you may read more
> this in my blog:
>> 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
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