** Chris G cl@isbd.net [2009-11-04 09:46]:
On Tue, Nov 03, 2009 at 07:57:35PM +0000, Paul Tansom wrote:
** Chris G cl@isbd.net [2009-11-03 18:49]:
<snip>
There's not enough detail of the nature of the setup to make specific suggestions, but one way you could use it to forward another port to the new machine. Then you can either telnet into the new port to test things out in a small way [1], and/or configure another domain/sub-domain to send mail into the new server [2].
Yes, I can send mail to the new machine using a different port. The problem is how to transfer some mail traffic to the non-standard port.
Just a couple of ideas that sprung to mind. I have a selection of domains and full control of my external mail server configuration including a full shell (virtual server), so this is along the lines I'd look at. I'm in the process of doing this myself and will be doing something similar. For a while during the process I'll be routing mail through the old server and forwarding it on to the new one using hubbed_hosts (Exim 4), which may be something you could adapt as well - i.e. forward on a particular mail account perhaps.
I have shell access on my hosting server but it's not a virtual machine so I don't have root access. I so have fairly flexible control of the mail routing. That's how I am able to send mail to multiple addresses.
[1] This either requires that you can telnet out through your connection and back in to the external port, or access to a shell session on an external computer (say work, or a suitable hosting account).
I have two shell accounts 'out there' so that's not a problem. So, yes, I can telnet into a non-standard port and make sure the SMTP server is answering.
[2] This may be more than your setup can manage. It may not be possible to set a different port, or configure a sub-domain for mail, and you may not be wanting to purchase an extra domain for testing!
No problem with domains or anything, that's what I do already to send my personal mail to my machine (it's what the SMTP server I'm talking about does in the main). My hosting service hosts isbd.net and isbd.co.uk, I have set up my home machine as chris.isbd.net and the mail gets sent there.
The issue/problem is the NAT forwarding, I can't see a way to handle two streams of incoming SMTP mail with one sent to port 25 and one sent to a non-standard port. E.g. there's SMTP messages arriving at the 'outside' of the NAT router and the port forwarding and firewall are set up to route them to my desktop machine's port 25. There's no way I can see to split off mail for, say, test.isbd.net to a different port from that sent to chris.isbd.net.
** end quote [Chris G]
As you say, you won't be able to differentiate between mail domains to route them differently using a basic NAT router. What you can do is telnet in to the alternative port and run the SMTP conversation manually, something along the lines of:
grey:~# telnet mail.aptanet.net 2525 Trying 87.127.190.18... Connected to mail.aptanet.net. Escape character is '^]'. 220 localhost.localdomain ESMTP Exim 4.63 Tue, 28 Aug 2007 13:20:01 +0100
ehlo grey.aptanet.net 250-localhost.localdomain Hello grey.vm.bytemark.co.uk [80.68.90.152] 250-SIZE 52428800 250-PIPELINING 250 HELP
mail from: paul.tansom@domain1.com 250 OK
rcpt to: paul@domain2.com 250 Accepted
data 354 Enter message, ending with "." on a line by itself
This is a test message to see if the SMTP port on minke is actually receiving and accepting data from external sources through the port forward on the router. . 250 OK id=1IQ05O-0001F0-R4
quit 221 localhost.localdomain closing connection Connection closed by foreign host.
I've tweaked the hosts and mail addresses a bit on that as I can't remember how public this list is!
Alternatively if you have a server doing the forwarding then you may have the ability to configure a different port when you configure the domain routing details. That will depend on your setup. I've not tried it, although I keep meaning to check whether the Exim 4 hubbed_host feature can manage it, preferably on a per domain basis.