| Intitulé du document : | Comment utiliser le relais smtps de gmail avec postfix ou exim ? |
|---|---|
| Localisation : | http://www.opendoc.net/comment-utiliser-relais-smtps-gmail-postfix-exim |
| Auteur : | Alexandre Bray |
| Date de création : | 2011/02/20 |
| Date de modification : | 2011/02/20 |
| Source : | http://ubuntu-tutorials.com/2008/11/11/relaying-postfix-smtp-via-smtpgmailcom/ http://www.casafire.com/content/relayer-les-e-mails-de-exim4-vers-gmail-ou-votre-isp |
| Tags : |
apt-get install postfix libsasl2-2 ca-certificates libsasl2-modules
relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes
ajouter vous mot de passe dans le fichier sasl_passwd
[smtp.gmail.com]:587 user.name@gmail.com:password
chmod 400 /etc/postfix/sasl_passwd postmap /etc/postfix/sasl_passwd
cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
Feb 20 18:57:19 xx.xx.xx.xx postfix/pickup[10733]: 8CA1B276E62: uid=0 from=<root> Feb 20 18:57:19 xx.xx.xx.xx postfix/cleanup[10837]: 8CA1B276E62: message-id=<20110220175719.8CA1B276E62@xxxxx.opendoc.net> Feb 20 18:57:19 xx.xx.xx.xx postfix/qmgr[10734]: 8CA1B276E62: from=<root@xxxx.opendoc.net>, size=325, nrcpt=1 (queue active) Feb 20 18:57:19 xx.xx.xx.xx postfix/cleanup[10837]: A19411A7AFF: message-id=<20110220175719.8CA1B276E62@xxx.opendoc.net> Feb 20 18:57:19 xx.xx.xx.xx postfix/qmgr[10734]: A19411A7AFF: from=<root@xxx.opendoc.net>, size=463, nrcpt=1 (queue active) Feb 20 18:57:19 xx.xx.xx.xx postfix/local[10839]: 8CA1B276E62: to=<root@xxx.opendoc.net>, orig_to=<root>, relay=local, delay=0.16, delays=0.1/0.04/0/0.02, dsn=2.0.0, status=sent (forwarded as A19411A7AFF) Feb 20 18:57:19 xx.xx.xx.xx postfix/qmgr[10734]: 8CA1B276E62: removed Feb 20 18:57:20 xx.xx.xx.xx postfix/smtp[10840]: certificate verification failed for smtp.gmail.com[74.125.43.109]:587] untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority Feb 20 18:57:24 xx.xx.xx.xx postfix/smtp[10840]: A19411A7AFF: to=<xxxx@opendoc.net>, orig_to=<root>, relay=smtp.gmail.com[74.125.43.109]:587], delay=5.1, delays=0.01/0.07/1.5/3.6, dsn=2.0.0, status=sent (250 2.0.0 OK 1298224637 x38sm3143990bkj.1) Feb 20 18:57:24 xx.xx.xx.xx postfix/qmgr[10734]: A19411A7AFF: removed
Rien de plus facile avec exim pour utiliser les relais gmail.
Editez le fichier update-exim4.conf.conf, modifier l'élément suivant :
dc_smarthost='smtp.gmail.com::587'
Un fichier est prévu à cet effet, éditer le fichier passwd.client
gmail-smtp-msa.l.google.com:votre_mail@gmail.com:votre_pass
Le tour est joué. Amusez vous !