Possible with Postfix?

I've been quite happily running Postfix for a few years, but now I'm looking to do something possibly unconventional.

At the moment, I have a machine sitting beside me that works as my primary mail server (amongst other things.) I have a Linode set up as a secondary MX.

If my primary is, for whatever reason, unreachable the Linode takes over and then sends the mail on when the primary is back in action.

I'm looking to work around a scenario like this:

  • DSL connection dies

  • DSL connection doesn't look like it's coming back any time soon (backhoe through the cable, telephone exchange stolen by space aliens, something like that.)

  • I set up a wireless (3G) broadband connection.

  • Rather than the secondary MX PUSHING mail through, I want my server to PULL it.

I know that I could make the IP address of the primary dynamic and then switch over to whatever I get on the wireless connection, but I don't want to do it that way.

I want to set up an SSH tunnel to my Linode, say "hey, give me my mail," and down it comes.

Is this possible? If so, how?

12 Replies

Sounds like you just want the mail to be stored locally on the Linode, as though it were the primary MX.

Store and forward, which is what it is doing at the moment. But with the ability to pull down to my primary as opposed to pushing to the primary via its regular IP address (which we will assume to be out of action.)

Actually, I don't see much of a point to a secondary MX like this. For brief outages, the sending mail servers will retry. For longer outages, I'd much rather have the senders find out that their mail didn't go through, rather than have it go to a secondary MX and be subject to a relatively untested configuration, which may not even be looked at until the primary is back up and running anyway.

Assuming the primary mail server's IP address is correct from the viewpoint of the secondary mail server (e.g. the DNS has been updated and TTLs have expired), look into using the ETRN command over SMTP. That's the "standard" way for a primary mail server to request a secondary mail server dump mail. It requires some configuration under Postfix, but I can't remember what…

The address from which the request is coming actually won't be correct as it will be coming from the dynamic address of the wireless broadband connection and I'm trying to avoid changing DNS records.

However, I'm wondering if this might be the way to go if I can, say, use a VPN.

I will now go read the Postfix ETRN README. Thanks for the suggestion.

Why does this sound like a job for UUCP?

Why does all e-mail sound like a job for UUCP?

You, kids, get off my lawn!

I wasn't trolling (this time). I set up UUCP for a project where I needed to deliver mail over an unreliable WAN, where the receiving server (external) couldn't actually connect to the destination server (internal). I had the internal server calling up the external server over UUCP, it could pick up its mail, worked like a charm.

Wow, that's cool! Sorry if I thought you were just knocking this newfangled SMTP stuff ;-)

This I will investigate. If this fixes my problem I will be quite delighted. Bit like a story an old farmer once told me when he got his tractor so stuck the only way he could get it out was by hitching it up to a pair of horses.

@mwalling:

Why does this sound like a job for UUCP?

% uustat -m
linode         09-09 20:47 Conversation complete
dastardly      09-09 20:01 Conversation complete
tinho          09-09 20:01 Conversation complete

@mwalling:

I wasn't trolling (this time). I set up UUCP for a project where I needed to deliver mail over an unreliable WAN, where the receiving server (external) couldn't actually connect to the destination server (internal). I had the internal server calling up the external server over UUCP, it could pick up its mail, worked like a charm.

My UUCP setup (which I use on my linode) is uucp-over-ssl-over-IP, with stunnel and s_client providing the necessary glue.

Mostly works great!

Thanks. Becoming increasingly convinced that good ol' UUCP needs to be dusted off and returned to active duty.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct