external and internal mailserver mismatch

  • web-server: ubuntu 16.04, i-MSCP 1.5.3 2018120800


    This server I used for webhosting, not for mail. I set A and MX records (mail.domain.tld) for any domain at the name-servers of my domain-provider pointing to an external mailserver. No problem so far. Now I want one domain to use the mail-service of the webserver and run into problems. Mails to other domains on the server which use the external mailserver seem to be delivered local, which causes errors like "mails for domain.tld loops back to myself" and "Recipient address rejected: User unknown in virtual mailbox table". I looked for the external mailserver settings in i-MSCP and wondered where to address the external mailserver, I cannot but activate or deactivate the use of whatever under this user-defined option. I think there must be something wrong with these settings but I cannot see them. Looking for /etc/postfix/imscp gives no hint, domains and relay-domaines are set properly. I checked the local DNS entrys in i-MSCP: are the same as those on the nameservers. When I dig the MX record from the webserver, I get answer from the first nameserver. Digging the same from at home, I get answer from the webservers i-MSCP-DNS.

    So what can I do to solve this problem?