Using the Univention Corporate Server with single email addresses and Postfix

Email for small setups with Postfix

A lot of system services rely on email or integrate this service. To use the Univention infrastructure with single email addresses, the following postfix configuration can be used.These instructions describe a setup for three freemail accounts using two different providers. Do not enter the freemail domains in UCS as a mail domain.

First install the following apps using the app center:

  • Fetchmail
  • Kopano Core (or another groupware)
  • Kopano Webapp
  • Kopano Z-Push

Receiving emails

Add the three user accounts using the UMC, enter the freemail address as the primary e-mail account. Configure fetchmail by opening the extended configuration from all the three user accounts. Send an e-mail from external clients to these accounts and wait up to 20 minutes until the e-mails appear in Kopano.

Sending emails

Add the following lines to /etc/postfix/ (not

sender_dependent_relayhost_maps = hash:/etc/postfix/relaymap
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwords
smtp_sasl_security_options = noanonymous
transport_maps = hash:/etc/postfix/transport

Activate changes:

ucr commit /etc/postfix/

Define freemailer smtp relays, create the file /etc/postfix/relaymap

Create hashfile:

postmap /etc/postfix/relaymap

Now configure the passwords for sending e-mails for every account, create the file /etc/postfix/sasl_passwords

Create hashfile and restart postfix:

postmap /etc/postfix/sasl_passwords
service postfix restart
Local delivery

At this point Kopano webmail can be used to send e-mails from one account to another, but every mail is sent to and fetched from the freemail provider. To ensure that local accounts communicate only using the UCS add the following:

Add to /etc/univention/templates/files/etc/postfix/transport.d/10_base lmtp: lmtp: lmtp:

Activate changes with:

ucr commit /etc/postfix/transport
service postfix restart






Leave a Reply

Your email address will not be published. Required fields are marked *