# Emerged new courier-imap and now all ...

## eltech

my hard work and effort is nothing, gone, non-functioning...

I just emerged the newest courier-imap from portage .. before i upgraded.. i

had courier-imap working perfectly, no problems .. i fixed my sqwebmail woes, and had everything pretty the way i wanted ...

then portage wanted an upgrade, so i upgraded .. then doing an emerge -up world show almost every package on my system wanted an upgrade ... so i went through the upgrade.. corier-imap was one of the packages that was to be upgraded...

sqwebmail and apache were also among the upgrades..

after the upgrade; apache worked as normal, and so did sqwebmail, however; i could not log in to retrieve mail using sqwebmail...

after the emerge, imap does not work .. cant connect using kmail or anything .. what could have possibly went wrong?

where can i look to fix the error?

i tried to google, but this is such a general problem.. so i seek help here, maybe to help me double check things that may need to be checked out..

here is what i get when i try to telnet to localhost on port 143

    code:

mail courier-imap # telnet localhost 143

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

courier-imapd is running.. netstat -nl shows ports 143, 993 and 143 listening.. so we know imap is running ..

/var/log/daemon.log

/var/log/mail.log

Have nothing.. there is a /var/log/mail.err ... it contains the following..

    code:

Dec 13 16:02:17 mail imapd: LOGIN FAILED, ip=[127.0.0.1]

Dec 13 16:02:17 mail imapd: DISCONNECTED, ip=[127.0.0.1], headers=0, body=0

var/log/messages & /var/log/syslog have nothing pertaining to this problem ..

when i try to use

    code:

mutt -f imaps://localhost

i connect, it asks if i accept the

certificate, and then it disconnects me ...

i re-emerged courier-imap after getting rid of any courier-imap file on my machine.. still nothing ..

in the file

/etc/services i have the following ..

    code:

imap2           143/tcp                         # Interim Mail Access Proto v2

imap2           143/udp

shouldnt 'imap2' be 'imapd' (JUST A GUESS)? i tried changing it to imapd and still got no change, so i guess that means no ...

for port 993 i have as follows ..

    code:

imaps           993/tcp                         # IMAP over SSL

imaps           993/udp                         # IMAP over SSL

so where is my problem here?

what can i double check?

sorry for the long message, but i like to show some of the effort i put into trying to correct this .

thanks..

----------

## CowMike

I have the same problem here  :Sad: 

----------

## eltech

you do? ok ..

hmm .. am emerging 1.5.1 right now .. hopefully this will change somethings ..

----------

## eltech

ok .. for some reason .. now things seem to be working after emerging 1.5.1 now.. 1.6.1 broken maybe?

i am getting a password error now ..

i will fiddle with this for a while ..

----------

## eltech

ok .. i went from 1.5.1 to 1.6.1 and back to 1.5.1 and back to 1.6.1 ..

before going to 1.6.1 the second time .. i had 1.5.1 working, but i was getting the 'wrong password' error

now after the emerge ... etc-update is in call .. look below

```
root@mail distfiles # etc-update

Scanning Configuration files...

The following is the list of files which need updating, each

configuration file is followed by a list of possible replacement files.

1) /etc/courier-imap/imapd-ssl

/etc/courier-imap/._cfg0000_imapd-ssl

2) /etc/courier-imap/pop3d

/etc/courier-imap/._cfg0000_pop3d

3) /etc/courier-imap/pop3d-ssl

/etc/courier-imap/._cfg0000_pop3d-ssl

Please select a file to edit by entering the corresponding number (-1 to exit):
```

so i choose '1'

```

--- /etc/courier-imap/imapd-ssl 2002-12-14 11:16:22.000000000 +0000

+++ /etc/courier-imap/._cfg0000_imapd-ssl       2002-12-14 13:13:41.000000000 +0000

@@ -1,11 +1,11 @@

-##VERSION: $Id: imapd-ssl.dist.in,v 1.6 2001/07/04 19:32:37 uid26639 Exp $

+##VERSION: $Id: imapd-ssl.dist.in,v 1.8 2002/08/11 20:00:20 mrsam Exp $

 #

 # imapd-ssl created from imapd-ssl.dist by sysconftool

 #

 # Do not alter lines that begin with ##, they are used when upgrading

 # this configuration.

 #

-#  Copyright 2000-2001 Double Precision, Inc.  See COPYING for

+#  Copyright 2000 - 2002 Double Precision, Inc.  See COPYING for

 #  distribution information.

 #

 #  This configuration file sets various options for the Courier-IMAP server

@@ -18,13 +18,6 @@

 #

 #  Download OpenSSL from http://www.openssl.org/

 #

-##NAME: install_prefix:0

-#

-# Do not change the following settings.

-

-prefix=/usr

-exec_prefix=/usr

-

 ##NAME: SSLPORT:1

 #

 #  Options in the imapd-ssl configuration file AUGMENT the options in the

@@ -104,7 +97,7 @@

 ##NAME: COURIERTLS:0

 #

-COURIERTLS=/usr/sbin/couriertls

+COURIERTLS=${bindir}/couriertls

 ##NAME: TLS_PROTOCOL:0

 #

@@ -182,3 +175,17 @@

 #

 #

 TLS_VERIFYPEER=NONE

+

+##NAME: TLS_CACHE:0

+#

+# A TLS/SSL session cache may slightly improve response for IMAP clients

+# that open multiple SSL sessions to the server.  TLS_CACHEFILE will be

+# automatically created, TLS_CACHESIZE bytes long, and used as a cache

+# buffer.

+#

+# This is an experimental feature and should be disabled if it causes

+# problems with SSL clients.  Disable SSL caching by commenting out the

+# following settings:

+

+TLS_CACHEFILE=/var/lib/courier-imap/couriersslcache

+TLS_CACHESIZE=524288

1) Replace original with update

2) Delete update, keeping original as is

3) Interactively merge original with update

4) Show differences again

Please select from the menu above (-1 to ignore this update):

```

thats just one of the changes .. its hard to say if i should do it or not..

----------

## CowMike

Hmm, weird ? I'm trying to get 1.5.1 working now (i had 1.5.3 working, but after I upgraded to 1.6.1, nothing worked ?  :Sad:  )

----------

## CowMike

Ok, I have 'authpam' with 1.5.1 running now... But authmysql doesn't work (settings are correct) ?

----------

## CowMike

Now trying to get back to 1.5.3 again...

----------

## CowMike

 *CowMike wrote:*   

> Now trying to get back to 1.5.3 again...

 Grrrr, 1.5.3 closes the connection when I do 'telnet localhost 143'  :Sad: 

----------

## eltech

it seems that some way some how .. the 1.6.1 install, borked the whole imap setup ...

i am not to knowledgable to finger out what it exactly did, but i know nothing works now .. regarding imap .. 

i am still under the same problems ...

----------

## CowMike

I have courier-imap-1.5.1 running now with 'authpam'.. I have to get authmysql running before tomorrow  :Sad:  Does someone know why authmysql isn't working now ?  :Sad: 

1.5.3 runned fine with authmysql, but when I upgraded to 1.6.1, the whole installation was fucked up  :Sad: 

----------

## eltech

Hello Mike ..

i have since yesterday corrected my problem ..

Courier-Imap 1.5.3 is an unstable version ... 1.5.1 is stable ...

----------

## CowMike

It's working now too here (1.5.1)  :Smile:  Stupid courier-imap  :Razz: 

----------

## eltech

good so you went from 1.5.3 to 1.5.1 and your problem is solved right?

glad to hear it ..

----------

## CowMike

No, i had 1.5.3 running (with authpam & authmysql) and upgraded to 1.6.1. Both methods weren't working, so I went back to 1.5.3, but nothing worked.

Then I got back to 1.5.1, and everything runs fine again  :Smile: 

Is their an explanation for it ?

----------

## eltech

yes ... 1.5.3 and 1.6.1 are of the unstable tree ...

the way that i ended up with the unstable 1.6.1 is because i added ACCEPT_KEYWORDS="~x86" to my make.conf

1.5.1 is the most up to date STABLE release in the portage tree ...

glad your working also ..

----------

## CowMike

Ah, ok, i'll remove those keywords from my /etc/make.conf (gentoo is running on a production server, so it has to be _stable_  :Wink: )

----------

## eltech

Yes remove that quickly  :Smile:  .. glad it was caught before other things got worse...

well take care and good luck to you...

----------

## CowMike

Thanks  :Smile: 

Now, I've to install 8 more servers on Gentoo (i'm glad they are fast: dual Xeon 2,5 Ghz (with Hyperthreading), 4 gb ram, 3x 73 gb scsi uw320 raid5 on a 100mbit  :Smile: ).

----------

## MoonWalker

Hey guys,

have you folded a report on this for bugs.gentoo.org? I though of just being a bit careful and not take the full jump from 1.5.1 to 1.6.1 so headed for 1.5.3 instead and ended up with just the same problem:

```
root@ns1 joakim # telnet localhost 110

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

root@ns1 joakim # telnet localhost 143

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

```

So wonder if this really are 1.6.1 specific...? either it may be a "leftover" from 1.5.3 or maybe something else in the system get effected? Im not so experienced on fiddling with this so don't know... no just question if I shall try for 1.6.1 or go back to 1.5.1 and hopefully get it working.

----------

## eltech

 *Quote:*   

> .5.3 and 1.6.1 are of the unstable tree ... 
> 
> the way that i ended up with the unstable 1.6.1 is because i added ACCEPT_KEYWORDS="~x86" to my make.conf 
> 
> 1.5.1 is the most up to date STABLE release in the portage tree ... 
> ...

 

cant file a bug as a result of an app from the unstable tree  :Smile: 

----------

## MoonWalker

 *eltech wrote:*   

> cant file a bug as a result of an app from the unstable tree 

 

Why not, how will it otherwise get stable if no one report the issues? And 1.6.1 are as far as I can see listed as the stable one on couriers download page. I assume this prolly is an ebuild issue and there might need to be some tweaking of the ebuild to get it installed the right way. Well just my thoughts on it...

----------

## eltech

Um .. if you use gentoo .. and you want to support ~x86 then you can report a bug for 1.6.1 ..

you can not go by the courier-imap and the state they claim the release to be ..

if the build can not build to conform with gentoo it is considered unstable which means; not ready for gentoo ...

if you do not edit your make.conf at all you will see that courier-imap-1.5.1 is the stable release ...

unless you use ~x86 .. 1.6.1 is not stable, and you should not use it unless you are willing to deal with teh circumstances ...

----------

