1

Can I have 2 email servers? One is in a VPS (planning to use contabo with cyberpanel) the other is the current hosting provider (dailyrazor). I keep getting down times for the email.

Can they back up each other and sync emails? If so, what kind of settings do I need?

I know with multiple MX you can have multiple email servers but how they communicate with each other I have no idea.

Update: after raj comment: I am using hosting's email service for the specific domain and the website is hosted on another VPS. DNS is handled by Cloudflare. so MX is already set up separately to the hosting url.

Onur Topal
  • 111
  • 5

1 Answers1

0

I know with multiple MX you can have multiple email servers but how they communicate with each other I have no idea.

There are several options:

  1. Traditionally, a secondary MX only buffers the received mail and tries to deliver it to primary MX via the same SMTP (just like the sender's own mail server would, only holding the mail for much longer before giving up).

    Such a secondary MX wouldn't provide any IMAP/POP access as the mail would only be held in SMTP queue – the only advantage is that mail doesn't get lost during extended downtime. (Though mail already shouldn't get lost during brief downtimes; most senders will keep retrying at least for 2-3 days.)

    This is 100% standard SMTP, so your hosting provider could do this easily if they wanted, but it needs to be configured (and it's likely that they don't offer this service); in any case the "necessary settings" depend on how the provider works. (On your side, you'd probably need to add an exception to bypass SPF/DMARC checks for mail coming from the secondary MXs.)

  2. Alternatively, it might be possible to set up a fully-featured secondary MX that has its own mail storage (and its own IMAP service) synchronized with the primary; this could be done if you're using e.g. Cyrus or Dovecot as the IMAP server (I'm pretty sure the former supports replication; the latter might via 'dsync' as well).

    This depends strongly on the IMAP server in question. The SMTP part can be simple – both servers just accept mail locally – but IMAP storage would usually be synchronized in a server-specific way; probably not something you could do with generic hosting (i.e. you'd need two VPSes).

  3. Finally, you could have two fully separate systems (VPS and hosting provider) and use a separate tool to keep two IMAP mailboxes in sync, such as "mbsync" or "OfflineIMAP". This would run continuously on your VPS as long as the VPS is working.

    This would work as long as the systems aren't excessively different (though the sync tools can often remap different folders such as Junk⇆Spam), but needs to be set up individually for each user account, and wouldn't provide automatic failover for IMAP – you would need to choose one system as your "imap.example.com".

grawity
  • 501,077