While trying to configure Kerio Connect accounts to work concurrently with external providers such as O365, Gmail, etc, the message sending and receiving is not working for both providers together.
The domain name configuration is the same for both providers, i.e. feelmorelaw.com. The MX records are pointing to external servers. User accounts have the same usernames in Kerio Connect and an external server.
The Kerio Connect DNS resolver won't be able to deliver emails with the same email address (firstname.lastname@example.org) to another mail server provider (O365) if that mailbox exists in Kerio Connect Administration. Kerio Connect looks up for local mailboxes first, then attempts to deliver email to the outside world. This is the default behavior of the Kerio Connect.
For example, if sending an email to domain kerio-connect.xyz, Kerio Connect performs DNS lookup, because it cannot recognize such domain locally.
If the message is sent to the local user, the Kerio Connect is not performing DNS lookup. The same can be observed while enabling DNS Resolver and Antivirus checking Debug logs.
The Mail logs report the instant email delivery when sending emails to the local user (vlad@ to andrei@)
[11/Jun/2020 08:39:06] Recv: Queue-ID: 5ee1edaa-0000000f, Service: Kerio Connect Client, From: <email@example.com>, To: <firstname.lastname@example.org>, Size: 784, Sender-Host: 0.0.0.0, User: email@example.com, SSL: yes, Subject: Test, Msg-Id: <firstname.lastname@example.org>
[11/Jun/2020 08:40:04] Recv: Queue-ID: 5ee1ede4-00000010, Service: Kerio Connect Client, From: <email@example.com>, To: <firstname.lastname@example.org>, Size: 837, Sender-Host: 0.0.0.0, User: email@example.com, SSL: yes, Subject: Test local, Msg-Id: <firstname.lastname@example.org>
[11/Jun/2020 08:40:05] Sent: Queue-ID: 5ee1ede4-00000010, Recipient: <email@example.com>, Result: delivered, Status: 2.0.0 , Remote-Host: 127.0.0.1, Msg-Id: <firstname.lastname@example.org>
[11/Jun/2020 08:41:17] Sent: Queue-ID: 5ee1edaa-0000000f, Recipient: <email@example.com>, Result: delayed, Status: 4.4.1 Cannot connect to host, Remote-Host: mail.kerio-connect.xyz, Msg-Id: <firstname.lastname@example.org