Merge branch 'master' into dist/ubuntu/precise/master

This commit is contained in:
Benjamin Bohard 2017-02-22 14:45:54 +01:00
commit ccdd4f552e
3 changed files with 23 additions and 1 deletions

View File

@ -7,6 +7,8 @@
<container name='mail' id='13'> <container name='mail' id='13'>
<package>eole-rspamd-pkg</package> <package>eole-rspamd-pkg</package>
<service servicelist='rspamd'>rspamd</service> <service servicelist='rspamd'>rspamd</service>
<file filelist='whitelist' name="/etc/rspamd/local.d/multimap.conf" rm='True'/>
<file filelist='whitelist' name="/etc/rspamd/map/domain_whitelist.map" rm='True'/>
</container> </container>
</containers> </containers>
<variables> <variables>
@ -19,13 +21,20 @@
<variable name='rs_spam_box' type='string' description='Nom de la boite de réception des Pourriels'> <variable name='rs_spam_box' type='string' description='Nom de la boite de réception des Pourriels'>
<value>Pourriel</value> <value>Pourriel</value>
</variable> </variable>
<variable name='activer_whitelist_domaine' type='oui/non' description='Voulez-vous filtrer les mails qui proviennent des domaines locaux ?'>
<value>non</value>
</variable>
</family> </family>
</variables> </variables>
<constraints> <constraints>
<condition name='disabled_if_in' source='activer_rspamd'> <condition name='disabled_if_in' source='activer_rspamd'>
<param>non</param> <param>non</param>
<target type='servicelist'>rspamd</target> <target type='servicelist'>rspamd</target>
<target type='variable'>rs_spam_box</target> <target type='family'>antispam</target>
</condition>
<condition name='disabled_if_in' source='activer_whitelist_domaine'>
<param>non</param>
<target type='filelist'>whitelist</target>
</condition> </condition>
</constraints> </constraints>
<help> <help>

View File

@ -0,0 +1,4 @@
%if %%activer_whitelist_domaine == 'oui'
%%domaine_messagerie_etab
i-%%domaine_messagerie_etab
%end if

9
tmpl/multimap.conf Normal file
View File

@ -0,0 +1,9 @@
%if %%activer_whitelist_domaine == 'oui'
sender_from_domain_whitelist {
type = "from";
filter = "email:domain";
map = "file:///etc/rspamd/map/domain_whitelist.map";
symbol = "SENDER_FROM_DOMAIN_WHITELIST";
action = "accept"; # Prefilter mode
}
%end if