Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Courier-imap: no telnet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Thu Dec 26, 2002 9:26 pm    Post subject: Courier-imap: no telnet Reply with quote

I've got the following problem:

I have qmail installed and that works perfectly. Now I would like to offer the maildirs as IMAP folders and I want to use courier-imap to do that. Also POP is to be achieved ;)
I've installed the qmail-pop3d and that one works perfectly. However the courier-pop3d does not seem to work for some reason(with the qmail-pop3d disabled of course). I'm using PAM authentication.
When I try to telnet the daemon (# telnet localhost 110) for POP, he connects and then says the foreign host closed the connection, like this
Code:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

There is no firewall running. I can get a perfect connection running the qmail-pop3d, so the port is not blocked.Running the courier-imapd gives me the same result for a telnet session

My guess is that there is something wrong with the authentication daemon. It looks like the hosts are being rejected. The setting of address is 0, making it to listen to all addresses.
I have no idea where I can set any other settings regarding to hosts.
Should I have someting extra in /etc/make.conf when emerging courier-imap. My USE variable looked like this when emerging courier-imap:
Code:

USE="kde qt -alsa gnome gtk ssl pam tcpd imap"

To give you some more settings:
in authdaemond.conf:
Code:
AUTHDAEMOND="authdaemond.plain"

in authdaemonrc(deleted out the comments here):
Code:

authmodulelist="authpwd authpam"
authmodulelistorig="authcustom authcram authuserdb authmysql authpam"
daemons=5
version=authdaemond.plain
authdaemonvar=/var/lib/courier-imap/authdaemon

/etc/courier-imap/pop3d(deleted the comments here):
Code:

PIDFILE=/var/run/pop3d.pid
MAXDAEMONS=40
MAXPERIP=4
AUTHMODULES="authdaemon"
AUTHMODULES_ORIG="authdaemon"
DEBUG_LOGIN=2
POP3AUTH="LOGIN"
POP3AUTH_ORIG="LOGIN CRAM-MD5 CRAM-SHA1"
POP3AUTH_TLS=""
POP3AUTH_TLS_ORIG="LOGIN PLAIN"
PORT=110
ADDRESS=0
TCPDOPTS="-nodnslookup -noidentlookup"
POP3DSTART=YES
MAILDIR=~/.maildir/


What could I be doing wrong here?
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Thu Dec 26, 2002 9:50 pm    Post subject: Reply with quote

Are you sure that the daemon is running ?

Is there anything in the logs ?

What gets returned when you execute :

/etc/init.d/courier-pop3d status


Last edited by msalerno on Thu Dec 26, 2002 9:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Thu Dec 26, 2002 9:51 pm    Post subject: Reply with quote

Yes, daemon is running and there is nothing in the logs to be found. I find it all very strange too.
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Thu Dec 26, 2002 10:01 pm    Post subject: Reply with quote

Just for testing, I diabled the qmail-pop3d and enabled the courier-pop3d daemon, and everything worked ! Are you using the latest version of Courier-Imapd ?

Here is a working copy of my /etc/courier-imap/pop3d with no modifications except that I removed the comments.

prefix=/usr
exec_prefix=/usr
sbindir="/usr/sbin"

PIDFILE=/var/run/pop3d.pid

MAXDAEMONS=40

MAXPERIP=4

AUTHMODULES="authdaemon"

AUTHMODULES_ORIG="authdaemon"

POP3AUTH=""

POP3AUTH_ORIG="LOGIN CRAM-MD5 CRAM-SHA1"

POP3AUTH_TLS=""

POP3AUTH_TLS_ORIG="LOGIN PLAIN"

PORT=110

ADDRESS=0

TCPDOPTS="-nodnslookup -noidentlookup"

POP3DSTART=NO

MAILDIR=.maildir
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Thu Dec 26, 2002 10:09 pm    Post subject: Reply with quote

I think the problem lies in the authentication daemon. Tried your solution. Don't work!
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Thu Dec 26, 2002 10:18 pm    Post subject: Reply with quote

The only difference between my authdaemon and your authdaemon configuration is in the authdaemonrc file.

The authmodulelist line:

authmodulelist="authcustom authcram authuserdb authmysql authpam"

And my version line:

version=""
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Fri Dec 27, 2002 7:24 am    Post subject: Reply with quote

Nope, tried that one too, but it didn't work. Something very strange is going on here. I'm guessing something went wrong during emerging.
What should my USE look like?
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Sat Dec 28, 2002 12:25 pm    Post subject: Reply with quote

Do I need an MX record in my DNS server in order to get this working?
Back to top
View user's profile Send private message
Messiah
Tux's lil' helper
Tux's lil' helper


Joined: 30 Apr 2002
Posts: 139

PostPosted: Sat Dec 28, 2002 11:31 pm    Post subject: Reply with quote

No you do not need an mx record in your dns to have this working. I don't think it's a problem in authentication, I have seen many problems with courier-imap and authenticating, all of them had the same symptoms, you can login, and you will randomly get authenticated, or not authenticated at all.

Maybe it has something to do with permissions, or something else. Are you binding to a specific ip?
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Sun Dec 29, 2002 4:49 am    Post subject: Reply with quote

yep fixed ip 192.168.0.2, I've tried setting adress to 192.168.0.2, but that doesn't help. I guess something happens in the emerging although I don't get any errors, only one warning (can't really remember which one, but I was told it was innocent.).
Back to top
View user's profile Send private message
Messiah
Tux's lil' helper
Tux's lil' helper


Joined: 30 Apr 2002
Posts: 139

PostPosted: Sun Dec 29, 2002 3:07 pm    Post subject: Reply with quote

but when you bind courier-imap to the ip 192.168.0.2, then you should connect to that ip instead of 127.0.0.1, did you try that also?

So, what does the following do:
telnet 192.168.0.2 110
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Thu Jan 09, 2003 12:23 pm    Post subject: Reply with quote

The same thing. Connection closed by foreign host.
Back to top
View user's profile Send private message
stimpy
n00b
n00b


Joined: 18 Apr 2002
Posts: 49
Location: NZ

PostPosted: Tue Jan 14, 2003 2:13 am    Post subject: Similar login failure caused by pam upgrade(?) Reply with quote

I'm in a similar sounding situation. Recently my IMAP (courier-imap-1.6.2) stopped accepting login's
Code:

Jan 14 15:08:00 abc imapd: Connection, ip=[x.y.z.a]
Jan 14 15:08:00 abc imapd: LOGIN: DEBUG: ip=[x.y.z.a], command=LOGIN
Jan 14 15:08:00 abc imapd: LOGIN: DEBUG: ip=[x.y.z.a], username=stimpy
Jan 14 15:08:00 abc imapd: LOGIN: DEBUG: ip=[x.y.z.a], password=****
Jan 14 15:08:05 abc imapd: LOGIN FAILED, ip=[x.y.z.a]

It conincided exactly with an update of pam from pam-0.75-r6 to pam-0.75-r11.
Haven't worked out a solution yet.
Back to top
View user's profile Send private message
JWU42
n00b
n00b


Joined: 17 Aug 2002
Posts: 70
Location: Cornfields...

PostPosted: Tue Jan 14, 2003 2:23 am    Post subject: Reply with quote

I am having the same problem :?

PS - Gotta love Stimpy!
Back to top
View user's profile Send private message
btg308
n00b
n00b


Joined: 14 Aug 2002
Posts: 72
Location: Östersund, Sweden

PostPosted: Tue Jan 14, 2003 9:21 am    Post subject: Reply with quote

Works here, using pam 0.75-r10. Haven't tried r11.

Code:

authmodulelist="authpam"
version="authdaemond.plain"


Are you sure the authdaemon is running?
_________________
Gentoo Linux - Feel the speed.
Kawasaki GPZ 1100 - The need for speed.
Back to top
View user's profile Send private message
JWU42
n00b
n00b


Joined: 17 Aug 2002
Posts: 70
Location: Cornfields...

PostPosted: Tue Jan 14, 2003 1:50 pm    Post subject: Reply with quote

Only difference I saw in my /etc/courier-imap/authdaemonrc was this

Code:

authmodulelist="authpam"
version""


What is unusual is everything was working fine yesterday morning. After updating several things yesterday (including pam to -r11 and courier-imap to 1.6.2) it doesn't allow the login.
Back to top
View user's profile Send private message
stimpy
n00b
n00b


Joined: 18 Apr 2002
Posts: 49
Location: NZ

PostPosted: Wed Jan 15, 2003 2:51 am    Post subject: shameful admission of incompetence Reply with quote

I have to admit to a shameful amount of incompetence :oops:
Although I'd restarted imap, rebuilt everything, checked the configuration of authentication options for courier, had authdaemon running, i'd forgotten/overlooked restarting the authdaemon.
It only gets started on my system due to a dependency in courier-imapd, so although I'd restarted courier-imapd, the dependency was being statisfied by its earlier invocation.
Now it works just fine... Sigh!
(now to fix my libgnomeprintui compilation problem!)
Back to top
View user's profile Send private message
JWU42
n00b
n00b


Joined: 17 Aug 2002
Posts: 70
Location: Cornfields...

PostPosted: Wed Jan 15, 2003 3:47 am    Post subject: Reply with quote

All I should need to have running is...

postfix
courier-imapd
courier-imapd-ssl

Am I missing something?
Back to top
View user's profile Send private message
stimpy
n00b
n00b


Joined: 18 Apr 2002
Posts: 49
Location: NZ

PostPosted: Fri Jan 17, 2003 3:29 am    Post subject: processes running Reply with quote

you need your authdaemond running as well I believe. It should start up "Transparently" if you start courier-imapd through a dependency in /etc/init.d/courier-imapd{,-ssl}

(It has to be configured as mentioned above as well obviously.)

It will start a process authdaemond, authdaemond.plain, or whatever is configured.
Back to top
View user's profile Send private message
JWU42
n00b
n00b


Joined: 17 Aug 2002
Posts: 70
Location: Cornfields...

PostPosted: Sun Jan 19, 2003 3:13 pm    Post subject: Reply with quote

Isn't the authdaemon, in my case authpam, loaded in /etc/courier-imapd/authdaemonrc with this

Code:

authmodulelist="authpam"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum