[Solved] How to configure postfix to authenticate over starttls at relayhost?

Latest response

Hello all,

I could use some help with the configuration of postfix. I have to configure postifx to use SMTP Authentication when sending mails to a relayhost. The relayhost itself offers the following parameters:

telnet relayhost 25
EHLO localhost
250-relayhost
250-AUTH PLAIN LOGIN
250-AUTH=LOGIN PLAIN
250 STARTTLS

I would like to use STARTTLS to open a secure and encrypted channel and then transmit username and password for authentication.

Does anyone know a good tutorial or could explain how to do that?

Thanks in advance,
Joerg K.

Responses

Well, after I walked through the valley of tears i finally found a solution on the web. For others who might struggle as well here is the solution for my problem.

  1. At first I checked if my user credentials worked while authenticating over starttls
  2. Secound I followed the guide SMTP Authentication for Mail Servers
  3. Adding smtp_use_tls=yes above the new block from step two
  4. Installing cyrus-sasl and cyrus-sasl-plain on my machine
  5. systemctl reload postfix.service

Step 4 brought the solution. Because I did a minimal installation these to packages were missing. After installing them the setup works as expected.

In summary with installing the two packages from step 4 I've added the following lines to my main.cf:

# SASL SUPPORT FOR SERVERS
#
# The following options set parameters needed by Postfix to enable
# Cyrus-SASL support for authentication of mail servers.
#
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

Yeah! \,,/

Hi Jörg,

Thanks for sharing your solution - well done ... and good to know that you have left the "valley of tears" behind ! :)

Regards,
Christian

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.