May need outgoing mail relay...

I’m in a bit of a pickle. My data center is in hot water with their ISP. Apparently they have reached their spam warning threshold with their provided and have been force to block all outgoing mail - DC wide. I may very well soon be moving to a new data center.

This has nothing to do with my server except that I’m stuck in the middle of their problem and currently have over 3k email in the mail queue unable to go out.

What I’m wondering is if it’s possible to set my box up to use an outbound mail relay server and if so, what is involved? I’m also open to any other possibilities. My phone is ringing off the hook!

Brian

Hi Brian,

Does your ISP, or perhaps their ISP, offer a mail relay you can use?

You can configure Postfix to utlize a mail relay by going into Webmin -> Servers -> Postfix -> General Options, and set “Send outgoing mail via host” to the hostname or IP of the mail relay you’d like to use.

-Eric

My data center doesn’t currently have a mail relay, in fact in one of the notification emails I got from them, it was mentioned as a possible solution, but so far they haven’t made any progress with it. Their provider is Qwest and I don’t know what’s available there.

I was hoping the actual procedure in Virtualmin was as easy as you described. Are there outside services I can employ as a relay?

I’m sure there are, but I don’t have any personal experience in using them :slight_smile:

However, barring any other solution, I’m sure you could even setup a cheap VPS somewhere and utilize it as a mail relay… I’d imagine you could do that for $20 a month or less.

-Eric

Thanks for the tip Eric. I’m pushing the DC to find out where they are at with putting a mail relay in place.

No progress yet on my DC’s end. Here’s a thought; would it be crazy to use my office desktop (test server) temporarily as a relay? It has Virtualmin Pro on it and functional mail service.

It is on a dynamic IP (that never seems to change), so I know that could cause some rejects. If this is possible, how would I setup my local machine to accept the relayed mail?

Brian

Sure, you can use any system you want as a mail relay if it’s accessible and configured to act as such :slight_smile:

But, as you mentioned, you may see a significant amount of rejects.

To allow your main Virtualmin server to relay through it, you’d want to configure Postfix on your desktop to allow relaying from the server.

A simple way to do that would be to add your servers IP address to the “mynetworks” line in /etc/postfix/main.cf, then restart Postfix.

Some potential caveats are:

  1. Postfix on your desktop has to be visible to your server. You may need to setup port forwarding on your router in order for your server to reach your desktop, if your desktop is inside your LAN.

  2. Some ISP’s block incoming port 25 – that could interfere with the servers ability to see your desktop.

  3. Some ISP’s block outgoing port 25, and require you relay all email through them.

Hopefully it’ll do the trick for you though. Good luck :wink:

-Eric

Thanks Eric,

My local ISP doesn’t block anything, so no problems there. I already have email working on the local server.

I’ve added the server ip to mynetworks in main.cf in the local server and added my local hostname (tried the local ip too) to “Send outgoing mail via host” on the hosting server.

However when I try to flush the queue, nothing happens and no firewall log of any attempt even being made on the local server. I must be missing something.

EDIT:

From the hosting server maillog I am seeing tons of these…

relay=none, delay=49166, delays=49128/39/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to local.xxxx.com[xx.xxx.xxx.xx]: Connection timed out)

Heh, this hadn’t dawned on me earlier, but if your ISP isn’t allowing outbound SMTP traffic, it’s not going to allow it to your desktop either :slight_smile:

You might be able to configure it to utilize an alternative port on your desktop, such as 587, depending on how they’re going about blocking things.

-Eric

So are you saying that if my hosting DC has blocked outbound mail then that could also prevent me form using a relay? I know my host is blocking 587 as well as 25, I even tried 2525. Guess I was hoping the relay would bypass any blocks they had. Not sure where to go from here.

Yup, if they block outbound mail, it doesn’t matter if it’s being delivered, or relayed – it’s all outbound mail.

So unfortunately, it’ll all be blocked :-/

If you haven’t already, you might consider calling up the datacenter to see if they have any suggestions, it’s possible they can provide another way around it.

-Eric

I’ve got a request to the owner of the DC to step up here, but it’s a small company and he’s really overwhelmed, so his replies aren’t very timely.

Here’ another crazy idea… would it be possible to download the mail queue from my hosting server and copy it to my desktop queue? If possible, any ill-effects?

Success! Sent 4.5k emails through my desktop by using port 2525. Looks like about 1/3 of them were rejected due to the dyanamic IP and/or no rdns.

Guess I’ll find out how tolerant my local ISP is.