We have a Debian virtual machine and I want to use postfix and mailutils to send email via a relay SMTP server
Trying to connect to the SMTP server with telnet works.
telnet mail.sch.gr 587
Trying 194.63.239.110...
Connected to mail.sch.gr.
Escape character is '^]'.
220 mail26.sch.gr ESMTP Postfix (Debian/GNU)
AUTH LOGIN
334 VXNlcm5hbWU6
*************
334 UGFzc3dvcmQ6
*************
235 2.7.0 Authentication successful
However, if I try to send an email, the email isn't sent, the mail.log says
(SASL authentication failed; server mail.sch.gr[194.63.239.110] said: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6)
my main.cf is this:
# 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 (Debian/GNU)
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
relayhost=[mail.sch.gr]:587
smtp_sasl_mechanism_filter = login
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
inet_protocols = ipv4
the sasl_passwd is like this:
[mail.sch.gr]:587 [email protected]:password
(obviously user and password are replaced with the actual username and password)
I don't know how to proceed...