Right now it seems like the primary domain is used for mail server hostname but can we use different domains as they are added?
For example,
primary domain is box.domain.tld but then I added another user with different domain name like other.com.
Now while setting up my IMAP and SMTP, I don’t want to use box.domain.tld but other.com. I tried that but it’s not working.
Reason being is that my primary domain has been blocked by Spamhaus and will take sometime before I can unblock it. iCloud is rejecting my emails saying that my mail server domain is in spamhaus list.
This would only work if your server had multiple IPs, since you can only have one PTR record per IP address. I mean, theoretically you could add multiple PTR records if your VPS provider allows it, which they most likely don’t, but that would cause even more problems since other servers would get inconsistent responses, meaning DNS would randomly return one FQDN or another.
Mail-in-a-Box does not support such a multi IP setup.
While it is theoretically possible to configure multiple domains for your clients to connect to, it wouldn’t solve your problem because it wouldn’t change anything in terms of server-to-server communication. Other mail servers would still receive the messages from box.domain.com because of what I explained above.
Well, the easiest thing to do would be to wait until domian.com is unblocked.
If you can’t wait, I see only two ways to get it working right now: Either reinstall Mail-in-a-Box and use box.otherdomain.com as the box’s FQDN, then add the blocked domain as a “secondary” email domain - or better yet, set up a separate Mail-in-a-Box server as box.otherdomain.com, and when domain.com is no longer blocked, move it to the new server.