I have a VPS with a few domains: domain1.com, domain2.com
FQDN = domain1.com
A self signed certificate for FQDN is configured automatically.
iRedMail (postfix + dovecot) is configured on this VPS. IMAP STARTTLS, mail servers (both imap, smtp) are the same domains (without mail.* subdomain).
When I'm trying to authenticate get the mail from domain1.com it works well. But when I'm trying to retrieve mail for domain2.com, I'm getting error that server name and email address domain differ (email@example.com -> FQDN domain1.com).
How to solve this correctly? Can I create self-signed multiple domains certificate? Or how can I configure postfix/dovecot to correctly process multiple domains?
I'm not able to send mail from clients. But can do that from web site (domain's website)
I'm able to receive mail from any domain (was able to configure only for Android) in case I'm using STARTTLS + Accept all certificates