Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix and GMail to send mails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Thesee
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2004
Posts: 138
Location: Belgium

PostPosted: Thu Mar 02, 2006 10:40 pm    Post subject: Postfix and GMail to send mails Reply with quote

Hello,

I had to re-install my Gentoo after a disk crash (bad luck :cry:).
I'm trying to get Postfix working correctly. Here is the trick: I was sening mails via the GMail smtp server.
I've been trying or the last 2 days to make it working but I still have the same thing.
With the previous installation, everything was working fine. So I copied the main.cf file and the certificate of this previous installation, hoping it would work. Ok, I'm a bit naive :D

So I said: "Ok, let's redo everything from scratch" and I fired up my Firefox and checked the HOWTO I found on the net: http://souptonuts.sourceforge.net/postfix_tutorial.html

I followed all the steps but can't send any mail. Here is the output in the /var/log/messages:
Code:
Mar  2 18:37:12 Phoebe postfix/smtp[4256]: Verified: subject_CN=smtp.gmail.com, issuer=Thawte Premium Server CA
Mar  2 18:37:12 Phoebe postfix/smtp[4256]: TLS connection established to smtp.gmail.com: TLSv1 with cipher DES-CBC3-SHA (168/168 bits)
Mar  2 18:37:12 Phoebe postfix/smtp[4256]: 23D4ECDDC: to=<xxx@yahoo.com>, relay=smtp.gmail.com[64.233.183.109], delay=0, status=bounced (host smtp.gmail.com[64.233.183.109] said: 530 5.7.0 Authentication Required c1sm1649772nfe (in reply to MAIL FROM command))


Here is my config:
Code:
Phoebe ~ # postconf -n
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
disable_dns_lookups = yes
html_directory = /usr/share/doc/postfix-2.2.5/html
mail_owner = postfix
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain $mydomain
mydomain = thesee.dyndns.org
myhostname = Phoebe.thesee.dyndns.org
mynetworks = 127.0.0.0/8 192.168.0.0/24
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.5/readme
relayhost = [smtp.gmail.com]:587
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
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
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_loglevel = 3
smtp_tls_per_site = hash:/etc/postfix/smtp_tls_per_site
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
smtp_use_tls = yes
smtpd_client_restrictions = permit_sasl_authenticated, reject
smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/FOO-cert.pem
smtpd_tls_key_file = /etc/postfix/FOO-key.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 450


Code:
Phoebe postfix # more smtp_tls_per_site
# Contents of /etc/postfix/tls_per_site
#  After changes run:
#    postmap /etc/postfix/tls_per_site
smtp.gmail.com         MUST_NOPEERMATCH


Postfix has been compiled with sasl and ssl:

Code:
Phoebe postfix # equery uses postfix
[ Searching for packages matching postfix... ]
[ Colour Code : set unset ]
[ Legend        : Left column  (U) - USE flags from make.conf                     ]
[                  : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for mail-mta/postfix-2.2.5 ]
 U I
 - - hardened    : activate default security enhancements for toolchain (gcc, glibc, binutils)
 + + ipv6        : Adds support for IP version 6
 - - ldap        : Adds LDAP support (Lightweight Directory Access Protocol)
 - - mailwrapper : Adds mailwrapper support to allow multiple MTAs to be installed
 + + mbox        : Adds support for mbox (/var/spool/mail) style mail spools
 - - mysql       : Adds mySQL Database support
 - - nis         : Support for NIS/YP services
 + + pam         : Adds support PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 - - postgres    : Adds support for the postgresql database
 + + sasl        : Adds support for the Simple Authentication and Security Layer
 - - selinux     : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
 + + ssl         : Adds support for Secure Socket Layer connections
 - - vda         : Adds support for virtual delivery agent quota enforcing


Please, tell me if you need any more information.

Thank you very much for your help :)
_________________
How does a UNIX expert have sex?
Unzip; strip; touch; finger; mount; fsck; more; yes; unmount; sleep.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum