You'd need a second smtp server running, or a port redirect, since the rest fo the world will still connect to your mail server on port 25. Maybe a firewall rule that will redirect requests from some other port to port 25 for you...
I lease an off-site server (I'm in Vegas, server is in Dallas) that I'd like to use for outgoing mail. I've already been using it for incoming mail for a long time.
Problem is, my ISP blocks outbound data on port 25. I hear this is not uncommon, I guess it's to protect them from spammers using their network to send a billion e-mails through a Russian server or something.
Anyway, I read somewhere that you can get around this by configuring your SMTP service to listen on port 80 instead of 25. Seems reasonable, I'm just not sure what files I need to edit and where to edit them. I'm running RH Linux 7.2.
Any help is appreciated. And I promise I'm not a spammer. I only want to do it because my ISP's SMTP server has been unreliable.
You'd need a second smtp server running, or a port redirect, since the rest fo the world will still connect to your mail server on port 25. Maybe a firewall rule that will redirect requests from some other port to port 25 for you...
Actually, I'm the only one that uses SMTP on my server. I have a few users who use the server's POP3, but they all use their own ISP for outgoing mail, and I have no plans to change that.
If you look at /etc/sendmail.cf there is a line
# SMTP daemon options
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
I suppose if you change smtp to 80. this might change the port.
THere is also an SMTP client option but, I don't know what that is.
Have you tried to google sendmail forum?
HTH
I changed the line to
# SMTP daemon options
O DaemonPortOptions=Port=80,Addr=127.0.0.1, Name=MTA
and indeed the Daemon listens on port 80.
but, I believe a better way would be to have your firewall redirect the port for you as ph34r suggested. I'm not that great with firewalls but it doesn't seem too complicated. Try asking this question on the security forum.
HTH
By "the rest of the world" I also meant people sending you mail. There is no way for your sendmail to run on port Foo and for my sendmail to know about it... so if you want to recieve mail (and I'm sure your pop3 users do), you still need it listening on 25.
[quote author=ph34r link=board=2;threadid=6910;start=0#64404 date=1051557072]
By "the rest of the world" I also meant people sending you mail. There is no way for your sendmail to run on port Foo and for my sendmail to know about it... so if you want to recieve mail (and I'm sure your pop3 users do), you still need it listening on 25.
[/quote]
I see. I'm still a bit of a newbie as far as networking is concerned. All I know is that to send mail I need to connect to port 25 (which is what I want to change) and to retrieve mail I need to connect to port 110 (no problems). But you're saying that mail coming into my server comes into port 25 as well? And if I change the SMTP port rather than duplicate it, I won't receive any incoming mail. Is that right?
lets say you are bob@foo.com and i'm bill@bar.com if i want to send you an email i connect from my home computer to either my isp's smtp or bar.com's smtp. then i tell them i wanna send bob@foo.com a message and here is the message. then that server will look up foo.com in the dns records, get the mail server from there, connect to the mail server on port 25 and say here is an email for bob@foo.com
so you need to keep port 25. you could put it on another port just for your use. 80 is not the best because that's used for web, which you most likely want to keep. how about 2525? sounds good. you can either configure the daemon to listen on both or just firewall:
iptables -t nat -A PREROUTING -p tcp --dport 2525 -j DNAT --to 127.0.0.1:25
good luck!
Yup, I understand. I just wasn't aware that incoming mail used port 25.
I don't think I actually have a firewall on my server. It's leased from C I Host. If there is a firewall (which I doubt), I don't have control over it. But I guess I prefer to lease a server already in a NOC as opposed to buying a server and leasing a T3 line.
But that's why I run into these problems. Because these friggin ISPs (Cox Cable) are so afraid that Dr. Evil is going to sign up for their service. I contacted tech support with a lengthy (but concise) message asking for support and workarounds. Their response? "Yes, we block port 25. Contact us for any other questions."
Lazy bastards. I guess they can't be bothered to write more than 12 or so words per e-mail, nevermind the fact that I pay them $60 per month for 3Mb service when their mail server is down 10% of the time. Apparently that's not good enough for them to trerat me as one of those "respected" customers.
Ahhh... WTF. I'm just ranting tonight. I've been drinking. A lot. I guess I'm done now.
Bookmarks