As you know most ISP's block port 25 on outgoing mail. Some of my clients wish to use our mail server as an outgoing mail server. However, we do not have TLS or SSL. Is there a way to accept incoming connections on say, port 2525 on the smtp server?
You haven't specified which smtp server you're using, so I'll propose a universal method to redirect that should work regardless of what software you're running.
Add these iptables rules:
Permit 2525/tcp through the firewall:
Redirect traffic arriving on 2525/tcp to 25/tcp:
I haven't tested this rule yet, but I believe it should work.
Keep in mind, though, that other mail servers out on the internet will not know that they need to connect on port 2525. If you're only using this for clients to send mail, though, using an alternate port should be no problem.
Additionally, I'd recommend that you use port 587 instead of 2525. Port 587 is the RFC-sanctioned SMTP "submit" port, and many clients will already be set up to use this. At this point in time, I know of no ISPs that block this submission port.
Ah -- you appear to be using sendmail.
If you look in your sendmail.mc, you probably have a line like:
If you remove the leading
Yes - most servers will easily allow you to change the port its listening on - and its simple to redirect connections to port 25 on a Linux box or any box sitting behind a moderately capable firewall. How you do that depends on the hardware / software / OS. Its also easy to configure most MUAs to use a non-standard port for SMTP connections.
The rest of the world will try to connect to port 25 on the host defined in the MX server when it wants to send mail to you, but you say that you're just looking to provide an outgoing mail service for your customers.
The obvious solution (for Linux, Unix, MSWindows and some others) is to use stunnel to shift the traffic onto a different port (and it'll also wrap it in SSL, potentially allowing you to use client certificate verification). But you do need to ensure that you have some authentication in place and also that your server is included in any published SPF records. If your customers/you don't own the domains you will be processing mail for, then its a non-starter.
What kind of server is it? Microsoft, Linux?
Let me know!