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$