LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-29-2003, 05:35 PM   #1
jordan0
Member
 
Registered: Sep 2003
Location: San Francisco
Distribution: Mandrake 9.1, Slack 9.1
Posts: 31

Rep: Reputation: 15
Connection refused on port 110...IMAP trouble


Hello again
I am trying to set up a IMAP server on my linux box so that I can check my email from home. postfix is installed and working I am able to send email messages via my smtp server and also read recieved email messages from the shell.

I installed imap-2002e and configured it according to its instructions:
1) compile using GNU make
2) update inetd.conf to reference the pop2, pop3, and imap daemons
3) update /etc/services to allow connections on ports 109, 110, and 143 for their respective protocols (pop2, pop3 and imap)
i rebooted the server to make sure that everything gets re-loaded, but when i try to connect from my mail client on another computer, it returns an error saying that the server refused to allow a conneciton on port 110

Here's a snippet of my inetd.conf:
# Pop and imap mail services et al
#
pop stream tcp nowait root /usr/local/ipopd/ipop2d ipop2d
pop3 stream tcp nowait root /usr/local/ipopd/ipop3d ipop3d
imap stream tcp nowait root /usr/local/imapd/imapd imapd

Here's a piece of /etc/services:
pop 109/tcp ipop2d postoffice # POP version 2
pop 109/udp ipop2d
pop3 110/tcp ipop3d # POP version 3
pop3 110/udp ipop3d
imap 143/tcp imapd # Interim Mail Access Proto v2
imap 143/udp imapd

What am I missing?
thanks!
 
Old 09-29-2003, 06:38 PM   #2
jordan0
Member
 
Registered: Sep 2003
Location: San Francisco
Distribution: Mandrake 9.1, Slack 9.1
Posts: 31

Original Poster
Rep: Reputation: 15
more on my problem...

After reading a few threads on LQ I have some more info to add to the above...
I think i have xinetd installed, but i dont know. there is no "imap" file in my xinet.d directory (there is only one file: linuxconf -web).
I have tried running the daemon by hand. ps -ef lists the process as running and when i run ipop3d it returns "+OK POP3 859c.adsl v2003.83 server ready"
I have verified that my MX record points to mail.fiftyfootfoghorn.com
When I telnet to localhost 109, 110 or 143 the connections are refused

My email client still refuses a connection on port 109, 110 or 143 in each of these scenarios...

I'm running Mandrake 7.2 btw

thanks!
 
Old 09-29-2003, 07:00 PM   #3
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
* Are you running iptables, which will filter out these new incoming connections?

* What does 'netstat -pan' say? (We're only concerted with 'LISTEN'ing ports)

* Can you 'telnet 127.1 110' from the local terminal?
 
Old 09-29-2003, 07:28 PM   #4
jordan0
Member
 
Registered: Sep 2003
Location: San Francisco
Distribution: Mandrake 9.1, Slack 9.1
Posts: 31

Original Poster
Rep: Reputation: 15
update

thanks for your reply. to answer your questions:

I am not running iptables

netstat -pan returns the following regarding LISTENing ports:
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 515/X
tcp 0 0 0.0.0.0:1025 0.0.0.0:* LISTEN 505/kdm
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 484/smbd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 480/sshd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 473/httpd

I still cannot telnet into 110 from localhost

what next?
 
Old 09-30-2003, 05:59 AM   #5
jordan0
Member
 
Registered: Sep 2003
Location: San Francisco
Distribution: Mandrake 9.1, Slack 9.1
Posts: 31

Original Poster
Rep: Reputation: 15
next problem...

alright...
I have finally made imapd, ipop3d, and ipop2d work!
apparently inetd wasn't even running!! argh

so now they wont accept my passwords...
i have my email client set to "password" authentication
i have tried 3 different user accounts including root and none of my passwords are accepted by the servers...
i am having the same problem when i try to use the smtp server (postfix) from my email client

any ideas?
 
Old 09-30-2003, 05:21 PM   #6
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
These daemons (pop3, imap, etc.) have probably been secured and will not allow checking root's mailbox. This is normal, and is a good idea. pop3 and imap (without SSL) transmit authentication information in clear text, making a simple email check from your mail client potentially make your root password available to others, which is obviously a taboo.

Regular users, however, should be able to check mail just fine.

Try 'tail -f /var/log/maillog' and try checking your mail. See if the -followed log shows anything indicating a problem.

SMTP is different, and unless you've configured SMTP-auth (if you've never seen this, you're not using it) SMTP does not user a username and password.
 
Old 09-30-2003, 05:43 PM   #7
jordan0
Member
 
Registered: Sep 2003
Location: San Francisco
Distribution: Mandrake 9.1, Slack 9.1
Posts: 31

Original Poster
Rep: Reputation: 15
thanks!

well the SMTP problem was a simple fix...
...how do i set up SMTP-auth?

I dont have a "maillog" file. i have looked in the syslog and found the following lines regarding imapd or ipopd:
Sep 30 04:15:38 859c ipop3d[13170]: pop3 service init from 127.0.0.1
Sep 30 04:15:53 859c ipop3d[13170]: Command stream end of file while reading line user=??? host=localhost.localdomain [127.0.0.1]
Sep 30 04:18:32 859c ipop3d[13193]: pop3 service init from 67.122.192.193
Sep 30 04:18:33 859c ipop3d[13193]: Logout user=??? host=adsl-67-122-192-193.dsl.pltn13.pacbell.net [67.122.192.193]

I have succesfully telnetted into localhost 143 and issued the command:
001 login jordan0 <password>
it returns the error:
001 NO LOGIN failed

I am also able to telnet into localhost 110. I typed the AUTH command and it returned:
AUTH
+OK Supported authentication mechanisms:
.
and then nothing

so this must be an authentication problem right? do I need to set up openSSL? I have it installed, but no certs, etc. I have never cofigured it.
 
Old 09-30-2003, 07:58 PM   #8
jordan0
Member
 
Registered: Sep 2003
Location: San Francisco
Distribution: Mandrake 9.1, Slack 9.1
Posts: 31

Original Poster
Rep: Reputation: 15
pushing forward...

I have, with much help, determined that my problem lies in the fact that I do not have any authentication method set up at all!
so i tried to configure imap-2002 with pam support (make lnp) but of course that fails...
here are the last few lines i get when trying to make:
sh -c '(test -f /usr/include/sys/statvfs.h -a lnx != sc5 -a lnx != sco) && ln -s nfstnew.c nfstest.c || ln -s nfstold.c nfstest.c'
Standard password authentication
ln -s ckp_pam.c osdepckp.c
Building without SSL support
ln -s ssl_none.c osdepssl.c
cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make lnx SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
osdep.c:66: security/pam_appl.h: No such file or directory
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/usr/local/imap-2002e/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/usr/local/imap-2002e/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/usr/local/imap-2002e'
make: *** [lnp] Error 2

thanks
 
Old 10-03-2003, 05:09 AM   #9
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
I don't know about this new troubleshooting method you're using. You don't need to setup any special authentication method if you install from rpm package (Mandrake), and you still don't need to do anything special for an authentication method even when compiling from source.

You need to issue the commands for pop3 like this:
USER username
PASS password
LIST
RETR 1
DELE 1
RETR 2
DELE 2
QUIT
etc...

AUTH, as is tells you, is used for listing supported authentication methods within the POP3 client, not for logging in. Telnetting to an IMAP server is a little difficult, so I can't confirm if your syntax for this is correct or not.
 
  


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
Error connecting to IMAP server 111 : Connection refused dolay Linux - Newbie 2 03-02-2010 05:09 AM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - Networking 5 10-22-2003 11:02 AM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - General 5 10-20-2003 07:49 AM
port 22: connection refused lkalman Linux - Networking 13 06-17-2003 07:55 PM
IMAP connection refused shameless Linux - General 4 05-25-2003 06:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration