Hi Rhys,

> I've decided to setup a `postfix` server on a remote VM that is
> configured to recieve any mail sent while my primary mailserver is
> "offline".

Like Ian, I'd go with the remote VM hosting the primary MX, though it's
more upheaval from your starting point.  It's likely to have better
connectivity uptime, and it doesn't point the Internet at your home IP
address with you having to open up incoming TCP ports.

> Is there a good way for me to test this is working for external mail
> and secure without actually taking my primary mailserver offline?

swaks(1) saves typing TELNET, or using socat(1), etc.
https://jetmore.org/john/code/swaks/

Block packets from your test device to the primary's IP address; this
will also test your sending SMTP program switches to the secondary if
it's configured as a smarthost.

> 250 2.0.0 Ok: queued as A1CC752D1
...
> And I do recieve the emails when sent directly this way, but I just
> want to verify it's all working correctly for external mail.

Does this remote secondary MX attempt delivery to the primary, or just
hold emails until you turn up to manually prod it?  If it attempts
delivery and you're offline for a while, say at HM's pleasure, then its
attempts may fail and the bounce and loss still occur.

Another approach is to not have a secondary, have the remote be the
primary, and use IMAP to access the emails on it.  Either fetchmail(1)
to retrieve them, or keep them there for access from multiple mail
clients.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2024-10-01 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
  New thread, don't hijack:  mailto:[email protected]

Reply via email to