Gmail smtp+postfix getting bounced for unknown reason

Thank you for the gmail smtp+postfix howto
Unfortunately I get this:
Nov 8 12:27:41 ODIN2 postfix/error[20109]: EDB1E77006EE: to=, orig_to=, relay=none, delay=0, delays=0/0/0/0, dsn=5.0.0, status=bounced ([smtp.gmail.com]:587)

using the gmail server works fine with ssmtp on my server.
Tha only instruction I cannot follow is "select Internet Site and for FQDN use something like mail.example.com

As I had postfix installed from before/did not get such a wizard.
I did, experiment a bit with adding a (fake) FQDN to “mydestination” and /or replacing myorigin with FQDN

I am on a dynamic IP, and recieving email is not that important, and being able to send alams/cron job outcome.

  
andre@ODIN2:~/script$ postconf -n  
alias_database = hash:/etc/aliases  
alias_maps = hash:/etc/aliases  
append_dot_mydomain = no  
biff = no  
config_directory = /etc/postfix  
debug_peer_level = 3  
debug_peer_list = smtp.gmail.com  
default_transport = error  
inet_interfaces = loopback-only  
mailbox_command = procmail -a "$EXTENSION"  
mailbox_size_limit = 0  
mydestination = ODIN, ODIN2, localhost.localdomain, localhost  
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  
myorigin = ODIN2  
readme_directory = no  
recipient_delimiter = +  
relay_transport = error  
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_tls_session_cache_database = btree:${data_directory}/smtp_scache  
smtp_use_tls = yes  
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)  
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem  
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key  
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache  
smtpd_use_tls = yes  
You have new mail in /var/mail/andre  
andre@ODIN2:~/script$   

Your config looks fine.

Try debugging postfix - http://rtcamp.com/tutorials/mail/postfix-debugging/

I am not sure about implication of DYNAMIC IP part. I would have recommended static IP but here mails are sent from Gmail server.

Did you checked Gmail account’s sent folder from gmail.com web-interface?

me being on dynamic IP, should be irrelevant, as ssmtp works fine with the the very same server, with the very same gmail smtp account.
needless to say, there’s no trace of this email in the accounts outbox.

Another thing that stops me from being able to debug this, is that debug level for this service is already =3 all I got in the log is the bounce message, then the msg is deleted - not even queued for retry. It’s as if the smtp server have a reason to deny service, but I do not know what might trigger that.

Try service postfix stop

Then /usr/sbin/postfix -v start

I hope you will see more debug output.

Purged ssmtp, and postfix, then reinstalled, instant success.
Thank you.

Thanks for confirmation. :slight_smile: