How-To: Configure Mail Relay With TLS

Info

To send emails via a relay host, it is sufficient to simply follow the manual: 14.7. Configuration of the mail server — Univention Corporate Server - Manual for users and administrators

This help article explicitly points out the necessary procedure so that the relay also works via a specific port, here port 587.

We will update the documentation in the future: Bug 57084 – Mail relay host configuration insufficient

1. UCR-variable mail/smtpport

The variable mail/smtpport specifies the port on which postfix is ​​listening. If this is changed, postfix can no longer receive anything from the UMC because it sends with port 25. For example, if emails are sent via self-service, the variable should remain set to 25:

ucr set mail/smtpport=25

2. UCR-variable mail/relayhost

The desired port for the relay (here port 587) is set in this variable and placed after the host name, separated by a colon. The host name of the variable mail/relayhost is set here with square brackets so that exactly this server is addressed without querying an MX record:

ucr set mail/relayhost='[mail.server.de]:587'

3. /etc/postfix/smtp_auth

The same entry from mail/relayhost must also be entered into the configuration file /etc/postfix/smtp_auth, followed by username/password, like described in the handbook:

[mail.server.de]:587 username:password

4. Update the authentication mapping

This step is necessary to update the postfix lookup tables, to apply the changes to the configuration file:

postmap /etc/postfix/smtp_auth

5. Reload the postfix service

Finally reload the postfix service to re-read the configuration files:

postfix reload
2 Likes

This topic was automatically closed after 24 hours. New replies are no longer allowed.

Mastodon