Messages are not getting in

Found the issue. It was DNS settings. MAIB suggested to set MX for second domain pointing to first one’s mail A record (I had to set MX mail.domain1.com on domain2.com, which didn’t work). Setting up MX for domain2.com to mail.domain2.com CNAME which points to the same IP of the mail server solved the issue. So both domains have A ‘mail’ record pointing to mail server, and both have mail.domain1.com and mail.domain2.com MX records accordingly.