LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-29-2004, 09:36 PM   #1
hardwired
LQ Newbie
 
Registered: May 2004
Location: Virginia Beach
Posts: 4

Rep: Reputation: 0
Switch SMTP port from 25 to 587


I have been searching and reading for two days and haven't been able to figure this one out, I hope someone can help.

I have a dial up account with an ISP provider and I also recently got high speed cable access from Cox.

Cox's mail system is a little flakey, they are currently playing with new anti-virus software and sometimes sent mail is held up for hours.

I want to send mail through my dial-up account mail server as it is more reliable, and timely.

But Cox blocks port 25 so it never reaches my dial-up account.

My dial-up provider said to change my SMTP from port 25 to 587 and it would go through and they would receive it. This was easy in Windows, I just went to accounts and entered 587 as the port. It works fine with Windows. Mail sent out through my high speed access goes out port 587, received by my dial-up account mail server and mailed from there, no holdups.

But I can't find a way to simply change my SMTP port to 587 in Linux. All the information I can find relates to sendmail, mailservers and such on my own system. I don't have or need any of that., I hope.

I'm running Fedora Core 1, 2.4.22 and the latest GNOME desktop
I route through a Linksys router, then to the coax cable modem.
All addresses are obtained automatically.
Router address is left at default.

I'm new at Linux, only about a week now. I have been reading and searching and scanning the forums and have managed to get everything installed and working on my Linux box except for this little mail thing.

As I said the method works fine in Windows, but I'm trying to get away from Windows, if you know what I mean.

Thanks for any help you can provide.
Jimmy
 
Old 05-29-2004, 10:51 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
/etc/services

Have you tried changing the SMTP port in your /etc/services file?

You can use "kill -1" to reset the daemons (for example, "ps -eaf|grep sendmail", get the PID, then "kill -1 SENDMAIL_PID"), or simply reboot the Linux host after updating the services file.

'Hope that helps .. PSM
 
Old 05-30-2004, 02:47 AM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
No no no, don't go changing /etc/services (if you do, it will hose lots of things); port 587 is for MSP (Message Submission Protocol), which is for clients to submit SMTP messages for queueing (not for servers to talk to each other).

hardwired, what e-mail client are you using in Linux to compose e-mail messages?
 
Old 05-30-2004, 07:46 AM   #4
hardwired
LQ Newbie
 
Registered: May 2004
Location: Virginia Beach
Posts: 4

Original Poster
Rep: Reputation: 0
chort,
You're right about that.
I changed it and this is the result using 'nmap'

-------------------------------------------------------------------------
[jn@localhost jn]$ nmap -v localhost.localdomain

Starting nmap 3.48 ( http://www.insecure.org/nmap/ ) at 2004-05-30 07:29 EDT
Host localhost.localdomain (127.0.0.1) appears to be up ... good.
Initiating Connect() Scan against localhost.localdomain (127.0.0.1) at 07:29
Adding open port 631/tcp
Adding open port 1026/tcp
Adding open port 587/tcp
Adding open port 22/tcp
Adding open port 111/tcp
Adding open port 1027/tcp
The Connect() Scan took 0 seconds to scan 1657 ports.
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1651 ports scanned but not shown below are in state: closed)from that account.
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
587/tcp open submission
631/tcp open ipp
1026/tcp open LSA-or-nterm
1027/tcp open IIS

Nmap run completed -- 1 IP address (1 host up) scanned in 0.528 seconds
--------------------------------------------------------------------------------------------------------------

It's now listed as 'submission' rather thatn SMTP and it didn't accomplish anything. I can still send from Cox though, and I can receive from both accounts OK.

I'm using Ximian Evolution 1.4.5, it came with the GNOME package.
I also have Mozilla mail installed but haven't tried that. I didn't know which was best, or if there's something even better, I just tried the default first.

Even though it was changed to 587, when the email returns an error it still says it can't open port 25, so it apparently ignored the change I made anyway.

Doing some more research it looks like I may have to set up a mail server on my system to accomplish the task, or use a third party to redirect it.
That's a little more than I want to get involved in with my lack of knowledge at this point.
I'll just have to keep using Windows to send it through to my dial-up account until Cox gets their mess straightened out.
Or set up a dial-up connection on my Linux box to send mail. I may be able to accomplish that by Tuesday morning when I have to leap back into action :-)

The problem is I work from a home office and can't afford to have sent mail held up for hours. One email didn't arrive for two days after it was sent. That's intolerable. Cox admits they are having problems scanning all the mail, as they are implementing their new virus screening some of the mail may be held up for a few minutes...... so they say.

I certainly appreciate you guys taking the time to help. I surely learned some more in the process, but it appears this is not
something I'll be able to tackle without really screwing things up and having to start over.

Side note:
You don't see any open ports in the list above that shouldn't be open do you? I want to make sure I haven't created any holes while I've been fumbling around.

Thanks again for the help,
Jimmy
 
Old 05-30-2004, 08:55 AM   #5
hardwired
LQ Newbie
 
Registered: May 2004
Location: Virginia Beach
Posts: 4

Original Poster
Rep: Reputation: 0
I think I got it !!!!!!!!

I changed /etc/services back to port 25

I rebooted and ran nmap to confirm the change. (I don't know how to restart the service, I just reboot)

--------------------------------------------------------------------------

[jn@localhost jn]$ nmap -v localhost.localdomain

Starting nmap 3.48 ( http://www.insecure.org/nmap/ ) at 2004-05-30 09:21 EDT
Host localhost.localdomain (127.0.0.1) appears to be up ... good.
Initiating Connect() Scan against localhost.localdomain (127.0.0.1) at 09:21
Adding open port 631/tcp
Adding open port 25/tcp
Adding open port 111/tcp
Adding open port 1027/tcp
Adding open port 1026/tcp
Adding open port 22/tcp
The Connect() Scan took 0 seconds to scan 1657 ports.
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1651 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
631/tcp open ipp
1026/tcp open LSA-or-nterm
1027/tcp open IIS

Nmap run completed -- 1 IP address (1 host up) scanned in 0.492 seconds

----------------------------------------------------------------------------------------------------------------

I went into the mail account setup and tagged the port number onto my dial-ups mail server address.

"smtp.exis.net:587"

I tried to send again and got the error "no relaying" , authentication required.

I took that as a clue and went back in and put a check in "authentication required".

On the next try a password box popped up, I entered my pasword for the dial-up account and the mail disappeared from my 'Outbox'.

I then checked my mail and it was received back in my Cox account.

It seems to be working perfectly now. It was really pretty simple to do, the figuring out how was tough.

Maybe this will help someone else with a similar problem., I hope so.

Thanks again,
Jimmy
 
Old 05-30-2004, 04:25 PM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
That's what I was getting at. It was simply a problem with how your mail client was configured. You should never change any of the system files like /etc/services and /etc/protocols unless you know what you're doing (and in that case, you wouldn't have to ask the question).

As a note for people who respond to questions, please don't give advice on changing system settings unless you're sure it will fix the problem.
 
Old 05-30-2004, 06:08 PM   #7
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
Hardwired, you seem to be confused about the difference between incoming and
outgoing email.

When you send an outgoing email normally, your client delivers it to port 25
on your ISP's smtp server, the ISP server then delivers it to port 25 on the
mail exchanger for the domain it is addressed to.

When you talk about port 25 being blocked you have to be clear if you
mean incoming connections to port 25 on your machine or outgoing connections
to port 25 on machines elsewhere on the internet.

>But Cox blocks port 25 so it never reaches my dial-up account.

You seem to be talking about outgoing email so it is possible that cox
is blocking outgoing port 25 but it is also almost certain that the
dial-up isp's smtp server is configured to only relay email sent from
customers connected to the dialup isp.

>My dial-up provider said to change my SMTP from port 25 to 587 and it
>would go through and they would receive it.

>But I can't find a way to simply change my SMTP port to 587 in Linux.
You will have to change it in whatever email client you use in linux.

nmapping your machine does not provide any insight into the problem.
When you send email you connect to port 25 on another machine, not yours.

>I'm using Ximian Evolution 1.4.5
I havn't used it but surely you can set the port number along with the
domain name of yout outgoing email server?

This site shows a port setting in the evolution options.

>it looks like I may have to set up a mail server on my system to
>accomplish the task,

If your ISP is blocking outgoing connections to port 25 then setting up
your own outgoing mail server won't work, it won't be able to connect to
mail exchangers. Running an outgoing server from a home DSL connection
generally dosn't work these days because 99.99% of the direct-to-mx
email coming from home connections is spam and viruses so most mail
administrators dump it all.
 
Old 05-31-2004, 08:48 AM   #8
hardwired
LQ Newbie
 
Registered: May 2004
Location: Virginia Beach
Posts: 4

Original Poster
Rep: Reputation: 0
zaphodiv,

I wasn't really confused, I knew what I needed to do, I just didn't know the best way to accomplish it with my two weeks of Linux experience. I used to install and train corporate customers on SCO Unix, (V3.1) but haven't touched anything UNIX in 10 years, am quite rusty, my terminoloy is sloppy at times, and I tend to ramble. I'm getting old, and raised two daughters, so my mind is not what it used to be, try to bear with me :-)

I was just attempting to provide some background on what I was trying to accomplish initially, rather than answer the inevitable questions that would come later as to why I needed to change the port assignment.

As I said (in too many words) there was no problem receiving mail, from either account.
There was no problem sending mail thru my cable provider's mail server.
The problem was the cable provider wouldn't relay it to my dial-up providers mail server as long as I was using the standard port 25.
My dial-up provider said to use port 587 rather than 25 to get around the blocked port.

So, as the thread title says I needed to change my SMTP port from 25 to 587.
It all seemed clear to me, but I knew what I was trying to do. :-)

I made it a much bigger problem than it was and later realized that I didn't really want to change any system settings, that would just screw up something else.

It suddenly dawned on me that I all should have to do is add the port to the mail server address, it's simple, it's easy, and doesn't change anything else. Exactly what the link you posted details, I just wish I could have found that about three days ago to wake me up sooner.

I had spent about 10 hours searching the web and discovered this is a common problem with Cox cable customers. But all the workarounds involved a third party mail service to forward it, or setting up a mail server with secure transactions, blah, blah. I developed a mindset that this was going to be pretty involved and I overlooked the simple solution. Once I quit reading about how tough it was going to be and gave up the answer came to me.

I normally don't post to forums, just read. But against my better judgement I decided to register and post the port change question as I was sure there was an easier way than what I was finding. As always, if I had just waited a couple of days I would have figured it out anyway, and avoided all this chatter, sorry.

I apologize for having needlessly taken everyone's time.

Jimmy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Openning ports - 587 ziphem Linux - Newbie 10 08-17-2005 08:14 AM
SMTP Port always open AJones Linux - Security 2 08-05-2005 10:34 PM
SMTP port blocked pierre-luc Linux - Networking 2 05-08-2005 02:53 PM
smtp port changes Bruce Hill Linux - General 1 10-17-2004 05:37 PM
SMTP Port changing mosherben Linux - Software 4 07-25-2004 11:16 AM


All times are GMT -5. The time now is 12:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration