Error on mail relay

Hello everybody,
We are trying to do mail relay with an external SMTP gateway but we are getting error. Bellow are some details on our configuration plus the error from log

  1. domain is called
  2. UCR variables
    –> mail/relayhost
    –> mail/relayauth (not set)
    –> mail/postfix/mynetworks
  3. DNS service record
    –>service SMTP, protocol TCP, priority 10, Weighting 10, port 25, server
    DNS host record = Public IP
  4. restart of postfix
    –> systemctl restart postfix
  5. The icmp resolution of is working and incoming mails also working though our external smtp gateway.

The log from /var/log/mail.log show host record not found but there are present.

 Sep 11 23:52:28 intranet postfix/smtp[17752]: warning: relayhost configuration problem
 Sep 11 23:52:28 intranet postfix/smtp[17751]: 1F6D0F06125: to=<>, relay=none, delay=2446,  delays=2446/0.03/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for type=A: Host not found)

We don’t find where we should modify the host from “” to “”.

Many thanks,


Postfix does not DNS lookups of type SRV, only of types MX, A and AAAA. So what’s actually interesting is the output of the following two commands:

host -t mx $( postconf relayhost | awk -F= '{print $2}' )
host -t a $( postconf relayhost | awk -F= '{print $2}' )

Kind regards

I had the same issue recently on my private system.

Univention brings its own dns and uses it by default for dns Lookups. Since your relayhost uses a subdomain of the same domain your UCS is using, UCS is looking up the domain in its local DNS, where no entry for mx1 exists.

One solution would be to manually mirror the dns entries in the local dns of UCS. In the end I went with simply not using the local nameserver, but an external one. e.g. ucr set nameserver1=


I had change nameserver1 and it is now working fine.
Many thanks to all of you.
Kind regards,