I am not sure if this is the right stack exchange for my question, there are multiple stack exchange were my question might fit.
I have setup my postfix configuration to send my emails through an external SMTP server (the SMTP of my ISP, because they demand so...). But whenever I send an email to an external email adress, it never arrives, I don't receive an error email back either (a 'you are blocked' email or whatever, which I do get if I use my own SMTP server).
Here is my mail.log. I run raspbian, and I have replaced all ip adresses and domain names, just to be sure :p. I sent this test email from squirrelmail, so thats why it says localhost:
Feb 2 16:37:41 raspberrypi postfix/smtpd[1468]: connect from localhost[127.0.0.1]
Feb 2 16:37:41 raspberrypi postfix/smtpd[1468]: D7AEEC3940: client=localhost[127.0.0.1]
Feb 2 16:37:41 raspberrypi postfix/cleanup[1472]: D7AEEC3940: message-id=<5c79eb3fbc01b4395bc543ebe4d6af0b.squirrel@mydomain.com>
Feb 2 16:37:41 raspberrypi postfix/qmgr[1372]: D7AEEC3940: from=<email@mydomain.com>, size=717, nrcpt=1 (queue active)
Feb 2 16:37:41 raspberrypi postfix/smtpd[1468]: disconnect from localhost[127.0.0.1]
Feb 2 16:37:42 raspberrypi postfix/smtp[1473]: D7AEEC3940: to=<externalemail@gmail.com>, relay=smtp.myisp.com[IPmyisp]:587, delay=0.35, delays=0.07/0.01/0.19/0.07, dsn=2.6.0, status=sent (250 2.6.0 <5c79eb3fbc01b4395bc543ebe4d6af0b.squirrel@mydomain.com> Queued mail for delivery)
Feb 2 16:37:42 raspberrypi postfix/qmgr[1372]: D7AEEC3940: removed
My main.cf file from postfix (again replaced some stuff):
smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.com, raspberrypi, localhost.localdomain, localhost
relayhost = [smtp.myisp.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
mailbox_command =
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
smtpd_helo_required = yes
smtpd_helo_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname,
reject_unknown_helo_hostname
check_helo_access hash:/etc/postfix/helo_access
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes
#################################
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ssl-cert-snakeoil.pem
My /etc/postfix/sasl_passwd is formatted like
smtp.myisp.com:587 username:password
.
Where username and password are the username and password of my ISP.
The SMTP server of my ISP uses TLS and port 587.
I have no idea why the emails aren't arriving, thanks in advance if somebody knows it.
EDIT: if I use an email client for my email account (e.g. outlook) and I enter the SMTP server details of my ISP directly into the client, the email does arrive. But this is not how I would like it to work.
EDIT2: Here is the new log:
Feb 2 19:48:12 raspberrypi postfix/smtps/smtpd[2469]: connect from myhostname[myIP]
Feb 2 19:48:13 raspberrypi postfix/smtps/smtpd[2469]: 76CCBC3ABC: client=myhostname[myIP], sasl_method=PLAIN, sasl_username=username
Feb 2 19:48:13 raspberrypi postfix/cleanup[2482]: 76CCBC3ABC: message-id=<tsun0i6rs8hhecmbo6cxrgnv.1454438894036@email.android.com>
Feb 2 19:48:13 raspberrypi postfix/qmgr[2467]: 76CCBC3ABC: from=<email@mydomain.com>, size=1277, nrcpt=1 (queue active)
Feb 2 19:48:13 raspberrypi postfix/smtp[2483]: Untrusted TLS connection established to smtp.myisp.com[IPmyisp]:587: TLSv1 with cipher AES128-SHA (128/128 bits)
Feb 2 19:48:14 raspberrypi postfix/smtp[2483]: 76CCBC3ABC: to=<externalemail@gmail.com>, relay=smtp.myisp.com[IPmyisp]:587, delay=0.58, delays=0.23/0.12/0.16/0.07, dsn=2$ dsn=2.6.0, status=sent (250 2.6.0 <tsun0i6rs8hhecmbo6cxrgnv.1454438894036@email.android.com> Queued mail for delivery)
Feb 2 19:48:14 raspberrypi postfix/qmgr[2467]: 76CCBC3ABC: removed
smtp_tls_loglevel = 1
to your config, reload, and add the log output if you try to send the mail.