Browse Source

ajout doc sur macromilter

master
Gregory Colpart 11 months ago
parent
commit
17d4e37d8f
1 changed files with 74 additions and 0 deletions
  1. +74
    -0
      HowtoMacromilter.md

+ 74
- 0
HowtoMacromilter.md View File

@@ -0,0 +1,74 @@
---
categories: mail
title: Howto Macromilter
...

* <https://github.com/sbidy/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
~~~





Loading…
Cancel
Save