Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Courier-imap woes...
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
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Mon Mar 21, 2005 4:48 am    Post subject: [solved] Courier-imap woes... Reply with quote

After I found out the Postfix/Courier-imap/MySQL guide was updated in a way that my old install was next to useless (I needed to adjust some things - which ofcourse I didn't remember how to do) I decided to upgrade all packages and start over.

After a bit of tinkering with postfix and the courier-authlib packages I even managed to install courier-imap version 4.0.1 itself. 3 hours later after a lot of cursing and loads of googling I decided to throw in the towel and ask for help:
I got postfix to do its job again; its using the MySQL backend to authenticate users and deliver mail.

Brilliant, however, most people actually want to read their mail (silly I know, would've saved me loads of irritation if it wasn't so) and therefor need some POP or IMAP backend to retreive the email.
But after checking the configuration files hundreds of times I still can't log in on my server, not using pop3, not using imap. When I try to telnet my way in I get a "Connection closed by foreign host." immediately.

Now I might be able to track the problem down by looking at the logs, but here's the catch: there are no logs :(
I viewed every log file in /var/log and none show any entries of the imap or pop daemons - its like the programs don't even exist. Except for the fact that couriertcpd is running according to 'ps aux'.

Now why doesn't the imap server show up in the logs? Has it something to do with that courierlogger program? If so, why does it screw up or where is its config?


Last edited by Cyberwizzard on Mon Mar 21, 2005 5:31 am; edited 1 time in total
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Mar 21, 2005 4:53 am    Post subject: Reply with quote

Post more stuff! Configuration and all that kind of things. Post as well, which version of courier, what type of encryption you use and and and....
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Mon Mar 21, 2005 5:03 am    Post subject: Reply with quote

And as always I come up with the solution when I ask for help :)

It seems that the gentoo scripts are faulty: they invoke the wrong path for courierlogger when starting the couriertcpd program which in turn fails to start the daemons because of the logger not working...

In /usr/lib/courier-imap are the .rc scripts which fire up the service daemons - edit the files and replace the logger path to become:
Code:
-stderrlogger=/usr/sbin/courierlogger


Do this for every service you want to use (in my case i just fixed imap and pop3, I won't be needing the SSL versions soon...) and fire up the /etc/init.d scripts again.
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Mar 21, 2005 5:19 am    Post subject: Reply with quote

on my installation:
Code:
mail / # grep stderrlogger /usr/lib/courier-imap/*.rc
/usr/lib/courier-imap/gentoo-imapd-ssl.rc:      -stderrlogger=/usr/lib/courier-imap/courierlogger \
/usr/lib/courier-imap/gentoo-imapd-ssl.rc:      -stderrloggername=imapd-ssl \
/usr/lib/courier-imap/gentoo-imapd.rc:  -stderrlogger=/usr/lib/courier-imap/courierlogger \
/usr/lib/courier-imap/gentoo-imapd.rc:  -stderrloggername=imapd \
/usr/lib/courier-imap/gentoo-pop3d-ssl.rc:      -stderrlogger=/usr/lib/courier-imap/courierlogger \
/usr/lib/courier-imap/gentoo-pop3d-ssl.rc:      -stderrloggername=pop3d-ssl \
/usr/lib/courier-imap/gentoo-pop3d.rc:  -stderrlogger=/usr/lib/courier-imap/courierlogger \
/usr/lib/courier-imap/gentoo-pop3d.rc:  -stderrloggername=pop3d \
/usr/lib/courier-imap/imapd-ssl.rc:                     -stderrlogger=/usr/sbin/courierlogger \
/usr/lib/courier-imap/imapd-ssl.rc:                     -stderrloggername=imapd-ssl \
/usr/lib/courier-imap/imapd.rc:                 -stderrlogger=/usr/sbin/courierlogger \
/usr/lib/courier-imap/imapd.rc:                 -stderrloggername=imapd \
/usr/lib/courier-imap/pop3d-ssl.rc:                     -stderrlogger=/usr/sbin/courierlogger \
/usr/lib/courier-imap/pop3d-ssl.rc:                     -stderrloggername=pop3d-ssl \
/usr/lib/courier-imap/pop3d.rc:                 -stderrlogger=/usr/sbin/courierlogger \
/usr/lib/courier-imap/pop3d.rc:                 -stderrloggername=pop3d \
mail / #


what is wrong with that?
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Mon Mar 21, 2005 5:31 am    Post subject: Reply with quote

The path to courierlogger was set to:
Code:
-stderrlogger=/usr/lib/courier-imap/courierlogger


And that doesn't work because the program ain't there.... After changing it to /usr/sbin (using 'which' to locate the correct path) it works! I don't know which version you have but I just emerged all the packages without using masks and it seems that the default scripts use the wrong paths...

Anyway, after finding out that the new courier-libauth package uses a different location for its mysql configuration I got everything back up again! :D
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Mar 21, 2005 5:38 am    Post subject: Reply with quote

Cyberwizzard wrote:
The path to courierlogger was set to:
Code:
-stderrlogger=/usr/lib/courier-imap/courierlogger


And that doesn't work because the program ain't there.... After changing it to /usr/sbin (using 'which' to locate the correct path) it works! I don't know which version you have but I just emerged all the packages without using masks and it seems that the default scripts use the wrong paths...

Anyway, after finding out that the new courier-libauth package uses a different location for its mysql configuration I got everything back up again! :D
GREAT
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Mon Mar 21, 2005 5:41 am    Post subject: Reply with quote

LOL

Figures, I finally get a lightning fast response with one of my linux problems and it turns out to be something I fix when I go for a coffee :lol:
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Mar 21, 2005 5:53 am    Post subject: Reply with quote

Cyberwizzard wrote:
LOL

Figures, I finally get a lightning fast response with one of my linux problems and it turns out to be something I fix when I go for a coffee :lol:
LOL
Back to top
View user's profile Send private message
Nicolinux
Apprentice
Apprentice


Joined: 22 Dec 2002
Posts: 204

PostPosted: Mon Mar 21, 2005 7:36 pm    Post subject: Reply with quote

Cyberwizzard wrote:
The path to courierlogger was set to:
Code:
-stderrlogger=/usr/lib/courier-imap/courierlogger


And that doesn't work because the program ain't there.... After changing it to /usr/sbin (using 'which' to locate the correct path) it works! I don't know which version you have but I just emerged all the packages without using masks and it seems that the default scripts use the wrong paths...

Anyway, after finding out that the new courier-libauth package uses a different location for its mysql configuration I got everything back up again! :D



Hi, I have courier-imap 3.0.8 and in /usr/lib/courier-imap/ is a link called "courierlogger" that points to /usr/sbin/courierlogger...
So courierlogger is there - but I still got no logs :(

Stefan
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Mon Mar 21, 2005 7:58 pm    Post subject: Reply with quote

Try changing the paths like I said to see if that makes a difference...

If it doesn't, try starting courierlogger by hand: provide the name for the syslog using one of the params and start typing. Every time you hit enter a new line in your logs should appear.
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