mirroir readonly du Gitit wiki.evolix.org (attention, ne rien commiter/merger sur ce dépôt) https://wiki.evolix.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.6 KiB

categories title
mail Howto Macromilter

Macromilter un démon pour filter les emails avec des pièces jointes avec des macros Microsoft.

Installation

Préparation :

# apt install python2.7 python2.7-dev libmilter-dev libmilter1.0.1 python-pip
# pip install oletools olefiles
# mkdir /etc/macromilter /var/log/macromilter
# pip install oletools pymilter configparser olefile (à confirmer)

Installation :

# cd /etc/macromilter
# wget https://raw.githubusercontent.com/sbidy/MacroMilter/master/macromilter/macromilter.py
# wget https://raw.githubusercontent.com/sbidy/MacroMilter/master/macromilter/config.ini
# chown postfix /etc/macromilter/*

# cd /etc/systemd/system/
# wget https://raw.githubusercontent.com/sbidy/MacroMilter/master/macromilter/macromilter.service
# systemctl daemon-reload

# cd /etc/logrotate.d/
# wget https://raw.githubusercontent.com/sbidy/MacroMilter/master/macromilter/macromilter.logrotate
# mv macromilter.logrotate macromilter

Il faut ajuster config.ini ainsi :

LOGFILE_DIR = /var/log/macromilter
LOGFILE_NAME = macromilter.log

Ajuster l’unité systemd en supprimant :

#Requires=var-run.mount

On peut ensuite :

# systemctl daemon-reload
# systemctl enable macromilter
# systemctl start macromilter
# systemctl status macromilter

Le démon écoute sur le port TCP/3690.

Pour l’activer, il faut modifier /etc/postfix/main.cf :

smtpd_milters = inet:127.0.0.1:3690
non_smtpd_milters = inet:127.0.0.1:3690
#milter_default_action=accept
# Pour accélérer les signatures, pas d'attente pour contacter le milter
in_flow_delay = 0s