postfix relay to mailjet

11/10/2018

installation

apt install mailutils

=> selectionner l'option pas de config

configurer

(normalement il existe pas. donc il faut le créer)

emacs /etc/postfix/main.cf
relayhost = in-v3.mailjet.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
compatibility_level = 2

emacs /etc/postfix/sasl_passwd
in-v3.mailjet.com VOTRE_CLE_API:VOTRE_CLE_SECRETE

chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
postfix reload

Pour faire un mail de test :

echo salut | mail -s subject martin.wb.2015@gmail.com -a 'From: contact@smsmachine.fr'

Penser à autoriser l'email contact@smsmachine.fr sur mailjet.