LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 02-18-2004, 02:31 PM   #1
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Rep: Reputation: 0
[CLOSED] port 143. can't telnet, service enabled, help?


Hey have just rebuilt my server with Gentoo which is just great. However, I am unable to log into the mail server. I am using uw-imap and have looked in all the usual places such as:

(1) etc/services
The entry's shown here are as they should be:
Code:
imap2           143/tcp                         # Interim Mail Access Proto v2
imap2           143/udp

(2) etc/xinetd.conf
This .conf file has all what it needs:
Code:
defaults
{
        only_from      = localhost
        instances      = 60
        log_type       = SYSLOG authpriv info
        log_on_success = HOST PID
        log_on_failure = HOST
        cps            = 25 30
        disable        = no
}

(3) etc/xinetd.d/imap2
... as does this one:
Code:
service imap2
{
        port                    = 143
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/imapd
        log_on_success          += DURATION USERID
        log_on_failure          += USERID
        disable                 = no
}

(4) netstat -lnt
Just checking to see if 143 was listening, but as you an see it is not:
Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN

(5) telnet print
Can't telnet either which is obvious from the above:
Code:
gandalf etc # telnet localhost 143
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
So after these five pointers, which I thought I would include, plus the fact that my firewall is turned off, could someone pls lend me their ears and suggestions? I would be most grateful!

thx. J

Last edited by trossachs; 02-18-2004 at 05:50 PM.
 
Old 02-18-2004, 03:48 PM   #2
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
Have you tried sending a HUP to xinetd?
 
Old 02-18-2004, 04:01 PM   #3
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
I dont understand. How would I go about that? thx
 
Old 02-18-2004, 04:07 PM   #4
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
kill -HUP `ps -aef|grep xinetd|grep -v grep|awk '{print $2}'`

That will look for the PID of the xinetd process and send it a HUP (HangUP) signal, which will cause it
to reload it's configuration file(s)
 
Old 02-18-2004, 04:12 PM   #5
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
But won't /etc/init.d/xinetd restart do the same thing?
 
Old 02-18-2004, 04:12 PM   #6
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
By the looks of it your imapd daemon isn't starting. I can see that you have enabled the imap in /etc/xinetd/imap2 file.

Did you restart the xinetd service after changing the imap2 file.

$service xinetd restart

Check if the service is running or not by doing

$lsof -i:143

If it is up and you can't telnet the it could be your /etc/hosts.allow and /etc/hosts.deny


If the server is not coming up then check your logs /var/log/messages and post the error.
 
Old 02-18-2004, 04:13 PM   #7
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
sure... if you want to take the easy way out ;-)
 
Old 02-18-2004, 04:19 PM   #8
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
sure... if you want to take the easy way out ;-)
What does that mean? I simply asked a question. For some reason my syslog-ng has not been printing out any further info as of Feb 14. It's a pain I know, but I don't know what else to do.
 
Old 02-18-2004, 04:27 PM   #9
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
try starting the daemon on the command line and see what it says.
 
Old 02-18-2004, 04:28 PM   #10
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
There is no issue with the daemon, see below:

Code:
gandalf ipv4 # /etc/init.d/xinetd start
 * WARNING:  "xinetd" has already been started.
 
Old 02-18-2004, 04:38 PM   #11
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
Once again, my sense of humor gets lost in the translation.. oh well...
Yes, /etc/init.d/xinetd restart does the same thing (well, not 100% the same, but the end result is)

Is syslog running?

ps -aef|grep syslog

Having some log messages might help to see what is happening.

What happens if you try to star the imapd process by hand?
 
Old 02-18-2004, 04:42 PM   #12
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Syslog is running:

Code:
gandalf ipv4 # ps -aef|grep syslog
root     25780     1  0 07:17 ?        00:00:00 /usr/sbin/syslog-ng
But I think there may be a prob with the way I have setup syslog-ng.conf, see below:

Code:
destination mail { file("/var/log/maillog"); };
filter f_mail { facility(mail); };
log { source(src); filter(f_mail); destination(mail); };

destination authlog { file("/var/log/auth.log"); };
destination syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination uucp { file("/var/log/uucp.log"); };
destination ppp { file("/var/log/ppp.log"); };
destination messages { file("/var/log/messages"); };
destination console_all { file("/dev/console"); };

#filter f_mail { facility(mail) and not match (imapd); };
#log { source(src); filter(f_mail); destination(mail); };

options {
        long_hostnames(off);
        sync(0);

        # The default action of syslog-ng 1.6.0 is to log a STATS line
        # to the file every 10 minutes.  That's pretty ugly after a while.
        # Change it to every 12 hours so you get a nice daily update of
        # how many messages syslog-ng missed (0).
        stats(43200);
};

source src { unix-stream("/dev/log"); internal(); pipe("/proc/kmsg"); };

log { source(src); destination(messages); };
log { source(src); destination(syslog); };
#log { source(src); destination(console_all); };
~
 
Old 02-18-2004, 04:51 PM   #13
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
what I meant was (if you forget your syslog for a mo)

1) Disable your imap2 in /etc/xinetd.d/imap2
2) Restart xinetd
3) Run imapd on commandline

$imapd


It should write something.
 
Old 02-18-2004, 04:57 PM   #14
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
Have you looked in /var/log/daemon.log for any errors relating to imapd?
 
Old 02-18-2004, 05:05 PM   #15
trossachs
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
There is no imap2 in xinetd.d, shall I create one? Also, nothing written in the daemon.log, I have just created it!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open 143 port in ipchains? htic22 Linux - Software 5 10-26-2004 10:52 AM
Which port is enabled gubak Linux - Newbie 5 08-05-2004 07:50 AM
enabling port 143 jay_gonzales Linux - Software 10 03-01-2004 04:39 AM
iptables and 2.6.1, not enough enabled? darklogik_org Slackware 4 01-26-2004 01:19 AM
IMAP port 143 ... and I'm an I-dot onescrewloose13 Linux - General 2 09-19-2003 08:00 AM


All times are GMT -5. The time now is 02:24 PM.

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
Open Source Consulting | Domain Registration