Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get postfix set-up on Ubuntu 13.04 but no luck so far. I found a few answers here on ServerFault that didn't work. I re-installed a bunch of times, nothing. This is my first time dealing with it, I followed this tutorial and this one. I tried this answer, nothing. This is what I get from telnet localhost 25 and ehlo localhost:

250-elclanrs.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

As you can see, no AUTH in there...

This is my main.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

readme_directory = no
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 192.168.1.0/24 [::1]/128 [fe80::]/64
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

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

Then I've this in sasl_passwd:

[smtp.gmail.com]:587 elclanrs@gmail.com:mypass

I also configured php.ini:

sendmail_path = "/usr/sbin/sendmail -t -i"

Nothing is working, emails are not being sent from PHP. How to make it work?

share|improve this question
    
What do your email logs say? –  Jenny D Apr 10 '13 at 4:54
    
Didn't think of that... This is my email log from my last attempt gist.github.com/elclanrs/fa2b9298d77c9f3a00ff/raw/…. Not sure what's going on, any ideas? –  elclanrs Apr 10 '13 at 5:17
add comment

1 Answer

(Based on log entries provided in comment) ... No such file or directory:bss_file.c:169:fopen('/etc/postfix/cacert.pem','r'): ... cannot load Certificate Authority data: disabling TLS support ... host smtp.gmail.com[173.194.68.109] said: 530 5.7.0 Must issue a STARTTLS command first

0 Fix your smtp_tls_CAfile
Check Postfix: Configuring Gmail as Relay (Ubuntu)
It suggests smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

1 Gmail offers only SMTP AUTH only over encrypted connections (after STARTTL or over SMTPS).

2 Debian package providing CA data is named ca-certificates

share|improve this answer
    
I'm still trying to solve this. I already have ca-certificates installed. What do you mean on point 1? Do I have to install something else? How do I configure Gmail with SSL on postfix? –  elclanrs Apr 10 '13 at 6:46
    
Also btw, I tried with "Internet Site" and basically all other options as well as "Satellite" with Gmail, but I couldn't get none working so far. I'm lost. –  elclanrs Apr 10 '13 at 6:48
    
1) About point 1: Gmail wants STARTTLS before SMTP AUTH. 2) I have added link to a detailed recipe for "gmail relay for postfix". Your smtp_tls_CAfile setting may be wrong. –  Andrzej A. Filip Apr 10 '13 at 8:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.