LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open. (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-open-mail-server-ports-25-110-and-220-other-ports-will-open-209526/)

Binxter 07-25-2004 02:53 PM

Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open.
 
To You Helpful People Out There:

I have spent the past two days trying to set up a mail server using sendmail on Fedora Core 2. I was originally hoping specifically for an imap server, but at this point I'll settle for anything if I can just get the services to open their respective ports.

I have all of the services loaded (sendmail, ipop3d, imapd), and running. My router is set up to port forward ports 25, 110, and 220 (as well as 23 and 80 for my FTP and Web Servers).

On the same machine I already have FTP and Apache up and running, listening to their ports, and I can successfully connect to both locally and remotely so I know that the ports are open to the internet. The mail services, are another story.

I've gone as far as disabling the built-in firewall, but even then the only open ports are:

$ nmap -sS -p 20-2550 localhost
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
23/tcp open telnet
80/tcp open http
111/tcp open rpcbind

(netstat -an | grep LISTEN yields the same results ... no mention of ports 25, 110, or 220 despite their services being started, the firewall being configured to accept them ... and then of course the firewall being shut off altogether.)

I've tried iptable scripting, but again the nmap returns the same list of open ports.

I've modified the DAEMON_OPTIONS in sendmail.mc, and even tried switching to a port other than 25 (and yes I ran "make -C /etc/mail" after modifying sendmail.mc). Everything seems to be running fine (they all restart very quickly with no errors), but the services won't listen to their ports.

I've run through every walk-through and how-to on the internet, and sendmail seems to be configured just as it should be. Regardless, I cannot telnet into port 25, 2525, 110, or 220 for the life of me.

How can I force sendmail, ipop3d, or imapd to actually open and listen to the ports they're supposed to be listening to?

Thank you very, very much in advance for your help,
Binx

ombill 07-25-2004 04:07 PM

Just a suggestion
 
I see you are using sendmail but you have the same symptoms I had on postfix.
so perhaps this may give you something else to try.

Postfix has the following config property

# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
inet_interfaces = localhost
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost

As you see the distribution default is to accept connections from the
host containing postfix. With this setting , only mail clients on the
postfix host can connect to port 25.

I commented out the line 'inet_interfaces = localhost', so that clients
on both localhost and workstations on my local network could establish
connections, and it solved the problem.

Hope this helps.

Bill.

Pete M 07-25-2004 04:15 PM

ombill

POP3 does'nt listen on a port it just uses it as needed

To see where Sendmail is listening enter
Code:

netstat -an | grep :25 | grep tcp
Result should be

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

To allow Sendmail to listen on all available interfaces put dnl in front of this line

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

As above


Pete

Binxter 07-25-2004 04:50 PM

So much closer to the gold
 
Thank you so much for your suggestions! Port 25 is finally open for business! ... But my POP3 and IMAP Mail Clients are still rejecting connection requests to my server.

Per your suggestions, I have modified both my postfix file and my sendmail.mc file. Then I decided to check my system logs and noticed I was getting a strange error on the sendmail.cf line:

sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 76: unknown configuration line "\n"

Whenever I ran make -C /etc/mail the config file generator was creating a line of gobble-dee-gook among the comments of the cf file, and this was preventing sendmail from actually starting. Of course, if sendmail isn't running then port 25 will not open.

I broke the rules a little and went into sendmail.cf and found that line 76 was an empty line with a bunch of "blank spaces" in it. I commented the beginning part of line 76 out with a #, and then tried to start sendmail up again. Magically, it ran and port 25 opened!!!

Now I guess I'm confused about POP3 and IMAP, and how they know when to open and let someone check their mail. ipop3d and imap are supposedly running ... but if they don't actually open or listen to ports, then how do they know when to receive and send mail?

What's the next magical step to get my mail server to actually accept a login?

Thanks again for your help. I love the Linux community.
-Binx

Pete M 07-25-2004 05:15 PM

Binxter

Missed this the first time round should'nt you be using ipop3 for port 110 not ipop3d ?

Pete

Binxter 07-25-2004 06:17 PM

I haven't come across a "straight-up" ipop3 service. The only services I have available to me are ipop3d and imapd (they came with the latest imap-2004a install). The documentation I have seems to suggest that ipop3d should work properly, though.

I know that my SMTP is set up properly now because I successfully telnetted onto port 25, and ran a helo, and sent a test e-mail. Now I just can't get a to connect to the server.

How do you tell the server to accept POP3 and/or IMAP connection requests?

My continuous thanks,
Binx

Binxter 07-25-2004 10:00 PM

POP3 is working!!! ... Sorta
 
I gave up on ipop3d (the "generic" POP3 server that came with sendmail), and switched to qpopper. Thank goodness for qpopper, because finally I'm up and running, and port 110 is open for business. I can send mail out to other e-mail accounts, and they receiving it fast as lightning. Unfortunately, whenever someone tries to reply to me they get (I've modified the names to protect my innocence):

----- The following addresses had permanent fatal errors -----
<myname@'myserver.com'>
(reason: 550 Host unknown)
----- Transcript of session follows -----
550 5.1.2 <myname@'myserver.com'>... Host unknown (Name server: 'myserver.com': host not found)

#------------------------------------------------------------------

I checked my E-mail System Logs and found the following messages which suggest that the mail made it to my server, but was then rejected because of my domain name.

sendmail[19042]: unable to qualify my own domain name ([myserver]) -- using short name

sendmail[19042]: i6P84CWC019042: from=root, size=509, class=0, nrcpts=1, msgid=<200407250804.i6P84CWC019042@[myserver]>, relay=root@localhost

sendmail[19583]: i6P8AK3O019583: from=<root@[myserver]>, size=743, class=0, nrcpts=1, msgid=<200407250804.i6P84CWC019042@[myserver]>, proto=ESMTP, daemon=MTA, relay=[myserver] [127.0.0.1]

sendmail[19042]: i6P84CWC019042: to=root, ctladdr=root (0/0), delay=00:06:08, xdelay=00:00:00, mailer=relay, pri=30509, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (i6P8AK3O019583 Message accepted for delivery)

#--------------------------------------------------------------------

Any thoughts?

Thanks,
Binx

Pete M 07-26-2004 01:52 AM

Binxter

To give Sendmail a host name look in /etc/hosts mine looks like this

127.0.0.1 server.mydomain.com server localhost.localdomain localhost

server is my machine name

You should also add your machine name to /etc/sysconfig/network here's mine

NETWORKING=yes
HOSTNAME=server

Try /etc/hosts this way but sometimes Apache complains about the format as it also checks this file but this way ensures Sendmail will only relay for this domain

Now add your domain to /etc/mail/local-host-names as below

mydomain.com

Otherwise your email address will be user@machinename.mydomain.com

The domain needs to be a FQDN (Fully Qualified Domain Name) because Sendmail checks via DNS

You really should reboot to make these changes take effect

There's a good tutorial for sendmail Here

Pete

b kool 06-05-2007 04:21 AM

can not open port 25, 110 using squid server
 
hi all,

i am using squid proxy server for internet sharing and our email is on some other server(web based) the problem i am facing from couple of days is that the client machines can not check their emails using Ms Outlook express squid server can not open the port 25 and 110 can any body please tell me how to open these prots........so that the client machines can use outlook to check their emails. waiting for reply.
thanx.

msami99 11-29-2007 02:03 AM

squid problm
 
hello..
i m using fedora n squid.. i configure squid n sendmail properly so that client can browse internet and can only send mail from outlook. but no client can recevie mail through squid server in outlook..
wt i have to configure more so that all client can receive their mail on their machine..in outlook
pls reply ..
thx


All times are GMT -5. The time now is 01:56 AM.