logo
  • Entries
  • Comment
  • Popular
Recent Posts
  • HTC HD2 vs HTC Desire
  • Hai sa navigam pe internet
  • Yahoo Messenger Inspector History
  • Cum setezi Postfix cu Google mail Relay
Recent Comments
  • lionel in Yahoo Messenger Inspector History
  • Ciprian in HTC HD2 vs HTC Desire
  • lionel in Yahoo Messenger Inspector History
  • Marius in Yahoo Messenger Inspector History
Popular Articles
  • Yahoo Messenger Inspector History (8)
  • Aspiratoare goggle (5)
  • Web Agency sau Web Shit ? (5)
  • flanco.ro - ce saracie (4)
  • Home

Cum setezi Postfix cu Google mail Relay

icon1 Posted by Marius in Uncategorized, tutoriale on 03 16th, 2010 | no responses

Google Apps ofera posibilitatea sa gazduiesti casutele de mail de la propriul domeniu pe platforma de la gmail. Ai foarte multe avantaje in privinta acestei schimbari, dar cel mai important e ca mail-urile tale nu mai ajung in spam/junk. Daca te hotarasti sa faci aceasta schimbare si iti administrezi propriul server pe linux trebuie sa stii ca smtp-ul de la gmail merge doar prin SSL, ceea ce inseamna ca lucrurile sunt putin mai complicate deoarece nu poti folosi clasicul sendmail. Trebuie sa instalezi postfix cu ssl support. Pentru a realiza acest lucru urmati pasii de mai jos:

Pasul 1: Instalam postfix si cyrus-sasl

[root@Marius ~]# yum install postfix cyrus-sasl

Pasul 2: Oprim serviciul sendmail

[root@Marius ~]# /etc/init.d/sendmail stop

Pasul 3: Setam sa nu mai porneasca sendmail la startup

[root@Marius ~]# chkconfig --del sendmail

Pasul 4: Verificam daca postfix a fost configurat cu suport SSL

Prima oara verificam unde este instalat postfix

[root@Marius ~]# whereis -b postfix
postfix: /usr/sbin/postfix /etc/postfix /usr/libexec/postfix

comanda de mai jos ar trebui sa returneze cel putin o linie
[root@Marius ~]# ldd /usr/sbin/postfix | grep ssl
libssl.so.6 => /lib64/libssl.so.6 (0x00002aad48f4a000)

Acum trebuie sa cautam certificatul serverului. De obicei este distribuit de openssl.
[root@Marius ~]# locate ca-bundle.crt
/etc/pki/tls/certs/ca-bundle.crt

Acum editam /etc/postfix/main.cf cu urmatoarele valori:
relayhost = smtp.gmail.com:587
mydomain = local.domain
myhostname = host.local.domain
myorigin = $myhostname
smtpd_sasl_path = smtpd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous

smtp_sasl_tls_security_options = noanonymous
smtp_use_tls = yes
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_sasl_tls_security_options = noanonymous

Adaugati username-ul si parola de la gmail in fisierul /etc/postfix/sasl_passwd
# The server info must exactly match the value
# for "relayhost" in /etc/postfix/main.cf
smtp.gmail.com:587 username:password

Generate a postfix lookup table from the previous file
[root@Marius ~]# postmap hash:/etc/postfix/sasl_passwd

Scapam de fisierul care contine user-ul si parola de la gmail in clar
[root@Marius ~]# rm -rf /etc/postfix/sasl_passwd

Restartam postfix
postfix reload

Trimitem un mail de test
[root@Marius ~]# sendmail email@example.com
Test relay prin gmail
.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Recent Posts

  • HTC HD2 vs HTC Desire
  • Hai sa navigam pe internet
  • Yahoo Messenger Inspector History
  • Cum setezi Postfix cu Google mail Relay
  • HTC HD2 vs iPhone 3Gs
  • Microsoft asculta de operatorii de telefonie mobila
  • Web Agency sau Web Shit ?
  • Aspiratoare goggle
  • flanco.ro – ce saracie
  • Cea mai buna metoda de marketing online

Categories

  • proiecte
  • stupizenii
  • tutoriale
  • Uncategorized

Archives

  • July 2010
  • April 2010
  • March 2010
  • February 2010

Blogroll

  • AdiPintilie
  • Claudiu Ionica

Search

Meta:

  • RSS
  • Comments RSS
  • Valid XHTML
© Copyright 2010. All rights reserved.