dlipner
Posts: 1
Joined: Wed Jul 01, 2020 10:15 am

Pi4 email server - postfix SASL authentication failure

Wed Jul 01, 2020 10:26 am

Hi, this is my first post so be kind :)

I am a beginner here and thought I would try and make the most of my new FTTP connection (BT) by setting up a RP4 as an email server.
I have installed postfix and configured it using a helpful guide from samhobbs.co.uk as well as adding in an extra bit of code to use BT smtp server for outgoing mail but when I try and send an email I get the following error:

Jul 1 11:09:25 raspberrypi postfix/smtpd[8659]: 301644050C: client=localhost[127.0.0.1]
Jul 1 11:09:34 raspberrypi postfix/cleanup[8681]: 301644050C: message-id=<20200701100925.301644050C@raspberrypi.home>
Jul 1 11:09:34 raspberrypi postfix/qmgr[8651]: 301644050C: from=<me@thelipners.com>, size=336, nrcpt=1 (queue active)
Jul 1 11:09:34 raspberrypi postfix/smtp[8683]: warning: SASL authentication failure: No worthy mechs found
Jul 1 11:09:34 raspberrypi postfix/smtp[8683]: 301644050C: to=<dlipner@gmail.com>, relay=mail.btinternet.com[213.120.69.88]:465, delay=18, delays=18/0.06/0.06/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server mail.btinternet.com[213.120.69.88]: no mechanism available)
Jul 1 11:09:37 raspberrypi postfix/smtpd[8659]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
~

This is my main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2


smtpd_sasl_type = dovecot
smtpd_sasl_path = smtpd

# 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

#for BT

relayhost = mail.btinternet.com:465
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_password
smtp_sasl_security_options = noanonymous
smtp_always_send_ehlo = yes



# 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 = raspberrypi.home
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, thelipners.com, raspberrypi, localhost.localdomain, localhost
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

This is the relay_password file:
I created /etc/postfix/relay_password with this:

mail.btinternet.com ****actualemail@btinternet:***passsword


Any ideas why the emails wont send?
Thanks so much in advance
David

Return to “Networking and servers”