Installation de Postfix

apt-get install postfix

 

configurationType of mail server : Satellite System
    • Mail Name : example.org (the name you want on your outbound mail)
    • SMTP relay host : smtp.gmail.com
    • Postmaster : I left this blank
    • Other destinations : I left this blank
    • Synchronous Queues : your choice, won’t impact the relaying
    • Network blocks to allow relay : default (unless you know what your doing)
    • Mailbox size : your choice, won’t impact relaying
    • Local address : i left this as ‘+’
    • Listen Address : all, your choice
Editer le fichier de config
vi /etc/postfix/main.cf

smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous

 

Création du fichier de sasl_passwd
vi /etc/postfix/sasl_passwd

smtp.gmail.com some.user@gmail.com:PASSWORD
Rebuild Hash
postmap /etc/postfix/sasl_passwd

 

Restart postfix
/etc/init.d/postfix restart

 

On sécurise un peu
chmod 640 /etc/postfix/sasl_passwd*
chown postfix.postfix /etc/postfix/sasl_passwd*