My jail config is
mta = mail
action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]
action = %(action_mw)s
take a note of %(mta)s-whois[name=%(__name__)s
value from action_mw
.
I tried updating the mail.conf
and mail-whois.conf
files with empty action values but neither had any effect..
What finally worked is copying mail.conf
file to mail.local
and then overriding the contents of mail.local
to:
[Definition]
actionstart =
actionstop =
and then cloning the mail.local
file into following results:
mail.local
mail-whois.local
mail-common.local
mail-whois-lines.local
Some of the files finally worked :)
R&D Note:
[INCLUDES]
section makes no sense. Based on definition from here:
The [INCLUDES]
section header specifies other filter files that are read in before or after this file.
So before
setting acts like a parent/base, and after
defines which files are the children
(override the current file).
We have:
mail.conf (nobody uses it??)
nothing in [INCLUDES]
mail-whois-common.conf
after = mail-whois-common.local
mail-whois.conf
before = mail-whois-common.conf
So based on action (in my case action_mw
) the chain must be:
mail-whois.conf
-> which loads mail-whois-common.conf
file BEFORE being loaded.
mail-whois-common.conf
loads the mail-whois-common.local
. I.e. local
file overrides the main conf
file.
See how mail.conf
is nowhere in this chain. Basically load sequence is following:
mail-whois-common.conf
-> mail-whois-common.local
-> mail-whois.conf
So, by chain's logic mail-whois.conf
file is the LAST one to load. It overrides all the prior settings specified in previous files.. Since I have default values set in mail-whois.conf
then I have no idea why my solution actually works :) Maybe mail-whois.conf
under-the-hood loads mail-whois.local
at the AFTER stage.
On a second though, maybe AFTER section is global. Is a sense that the order of loading is
mail-whois-common.conf
-> mail-whois.conf
-> mail-whois-common.local
I am too lazy to check it now :)