Make Kerio use MX records instead of A records when resolving domain name [message #140535] |
Thu, 02 August 2018 16:10  |
 |
lgsit
Messages: 38 Registered: December 2012 Location: /home/lgsit
|
|
|
|
Hello guys!
I have a question regarding mail forwarding. Is it possible to tell Kerio to use MX records instead of A records when resolving a domain name? I already added MX records to my DNS zone (local network) - one for my primary mail server (Kerio) and one for my backup mail server (Postfix).
Let's say that my domain is called example.com. Then my zone looks like this (just an excerpt):
mail IN MX 10 pri
mail IN MX 20 sec
pri IN A 127.0.0.1
sec IN A 127.0.0.2
The MX record mail.example.com resolves to pri.example.com and sec.example.com, which in turn resolve to 127.0.0.1 and 127.0.0.2.
When I set the host to mail.example.com in my domain forwarding rules (Domains -> (Tab) Forwarding) or the SMTP Delivery settings (SMTP Server -> (Tab) SMTP Delivery) and then send a test mail, I can see the following lines in the log:
[02/Aug/2018 00:00:00][110] {dns} Looking up host mail.example.com in DNS...
[02/Aug/2018 00:00:00][110] {dns} Searching cache for A records for host mail.example.com
[02/Aug/2018 00:00:00][110] {dns} Searching DNS for A records for host mail.example.com
[02/Aug/2018 00:00:00][110] {dns} Querying server no. 1, address 127.0.0.254
[02/Aug/2018 00:00:00][110] {dns} Got answer
[02/Aug/2018 00:00:00][110] {dns} Valid answer arrived
[02/Aug/2018 00:00:00][110] {dns} DNS query for name mail.example.com returned no A records
[02/Aug/2018 00:00:00][110] {dns} Host mail.example.com not found in DNS
So, Kerio tries to get the A record of mail.example.com, which does not exist (on purpose!) and fails to deliver the mail. I know that it is possible in Postfix to make it resolve either MX records or A records. For example in the main.cf you can say:
relayhost = mail.example.com
Or force Postfix to resolve A record instead of MX records:
relayhost = [mail.example.com]
This already works perfectly fine (in Postfix), but I would like to have this behavior in Kerio, too.
Any help would be appreciated!
Regards,
Matthias
|
|
|