PDA

View Full Version : IMAP2 install (for RoundCube use)


edge
30th April 2007, 22:20
After I updated my server from Debian Sarge to Etch, my o so nice tweaked RoundCube stopped working (it used to work with no problem when the server was still in "Sarge" mode)

The webmail page does showup nice, but it's not possible to login anymore.
It's always giving me a login failed error (with email address or web ID)

Looking at the RoundCube log files I see the following error: "IMAP Error: Could not connect to localhost at port 143: Connection refused in on line 0"

Doing a "netstat -tap | grep imap" does indeed show me that I do not have imap2 running.

When I did the update from Sarge to Etch at one stage it asked me something about configure the uw-imaps, and it did show me 3 options. IMAP2, IMAP3 and IMAPS.

I only selected IMAPS, and "netstat -tap | grep imap" does show me that imaps is running.

After the question about the uw-imaps it asked for a "Enforce port selection" for the uw-imaps. Here I selected yes.

Anyway... Now.. How do I get IMAP2 up and running again?
Can I just do a "apt-get install courier-imap courier-imap-ssl courier-pop courier-pop-ssl", and if so, will this change anything for the users who login with POP3?

The server(s) are running ISPconfig.

What is strange is that when I installed ISPconfig I did NOT install the Courier-IMAP / Courier-POP3 package, but RoundCube worked fine on my system!

Hans
1st May 2007, 15:31
Edge,

RoundCube does not store passwords within the database of your RoundCube website. It uses the IMAP server in stead.
Because of your IMAP server courier is not configured correctly, RoundCube can not an establish a connection to your IMAP-server courier.

The setup for Courier is a little bit different for Etch then for Sarge.
Please have a look here http://www.howtoforge.com/perfect_setup_debian_etch_p5 step 12

And also here:
http://www.howtoforge.com/forums/showthread.php?t=10106&highlight=Etch+saslauthd

Of course, make sure that port 143 is open.

Probably ( i did not check this) you can reconfigure Courier-imap and Courier-base with:

dpkg-reconfigure courier-imap
dpkg-reconfigure courier-base


With this info, i hope to help you on the right track.

edge
1st May 2007, 16:34
Thank you for the info Hans, but I'm now even more lost. I guess the update from Sarge to Etch did not update that part as it was working fine..

Anyway. I've done the step "12 Courier-IMAP/Courier-POP3" on one of the servers, and after that Outlook could not login anymore till I enabled "Maildir" in the ISPconfig part.
Accessing and receiving email with Outlook now is working fine, BUT some users still have email sitting in the /var/mail/webNR_name file that they can not access as it was received before the "step 12" and me enabling the "Maildir"

So... Next problem.. How can they access the mail that was received before the "step 12" en me enabling "Maildir"

Hans
1st May 2007, 17:25
Please check if those messages are still in queue.

You can check your mailqueue with the command:
mailq

With the command:
postsuper -r *QUEUE ID*

(You can release one mail)


or:

With the command:
postsuper -r ALL

(You can release all)

See also: http://postfix.raktas.net/postsuper.1.html


If the mails are not in queue anymore, i do not have an answer right now.

edge
1st May 2007, 18:08
Thans again Hans,

The mail que is empty :/
I think that the only way of getting the users it's "old" email is by using WebMin, and forwarding it again to the email address. This sucks, as one of the servers got a lot of users, and a lot of mail on it.

I guess project RoundCube is done for me, and I'll get the users to start using UebiMiau.

Hans
1st May 2007, 19:04
Edge,

I understand that you're not happy with the situation, but i personally i do not think it has nothing to do with RoundCube itself.

RoundCube is only a webmail client to read your mail via the web, like any other webmailclient.

Please, ask Till & Falko for advise what to do in this situation, as they have more experience than me. But if i can help, i will of course.

edge
1st May 2007, 19:30
Hans, please do not get me wrong.
I love RoundCube, and I'm 100% sure that RoundCube is not the problem!

Untill I find a way to convert my system from a not Maildir, to a Maildir system without loosing all the mail that is allready on the system, I'm not going to install the "Courier-IMAP/Courier-POP3" stuff.

Hans
1st May 2007, 19:54
Edge,

I never knew that your system did not use the Maildir format.
So, if RoundCube worked with Sarge, it should also work on Etch.
So, we're missing something else and if you do not prefer the Maildir format, you should consider to make the step back. First we need to find out, why RoundCube does not work anymore after your update to Etch.

Did you see any warning which, related to your RoundCube website within:

/var/log/mail.log or /var/log/mail.warn or /etc/apache2/error.log ?

(I mean errors that occurred before you enabled Maildir).

edge
1st May 2007, 20:25
Okay lets start with the system that I did NOT update with the "Courier-IMAP/Courier-POP3" (apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0)

This system is still with MailDir NOT enabled!
Problem now is that login (with email address or webNR_name) is not possible.
Before the update from Sarge to Etch all was working fine.

/var/log/mail.log
nothing concerning RoundCube

/var/log/mail.err
empty

/var/log/apache2/error.log
nothing concerning RoundCube

/var/www/webmail.domain.tld/log/error.log
no errors

/var/www/webmail.domain.tld/web/logs/errors (the Roundcube error log file)
[01-May-2007 19:09:32 +0200] IMAP Error: Could not connect to localhost at port 143: Connection refused in on line 0


netstat -tap | grep imap
tcp 0 0 *:imaps *:* LISTEN 20516/inetd

/etc/init.d/courier-imap restart
bash: /etc/init.d/courier-imap: No such file or directory

/etc/init.d/courier-imap-ssl restart
bash: /etc/init.d/courier-imap-ssl: No such file or directory

/etc/init.d/courier-pop restart
bash: /etc/init.d/courier-pop: No such file or directory

As you can see. The problem is the missing IMAP stuff.
Doing step 12 "Courier-IMAP/Courier-POP3" might fix this, but than I need to enable Maildir in ISPconfig, and this will cause the problem with all the mail that is allready in the users email box.

Hans
1st May 2007, 21:04
Hi Edge,

You can not use the commands

/etc/init.d/courier-imap restart
/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop restart

without installing courier as described here http://www.howtoforge.com/perfect_setup_debian_etch_p5 step 12.

I do not understand how you used IMAP2 before!

Did you enabled it in the past within /etc/inetd.conf by changing the imap2 line from:

#<off># imap2 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/imapd

into:

<on># imap2 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/imapd

and restarted inetd with:

/etc/init.d/openbsd-inetd restart ?

I wonder if that is possible with ISPConfig.
I always took exactly the steps within the perfect howto.

I always used the Maildir format on my ISPConfig servers, with courier installed.
So at this point i am not sure how to help you any further.
Sorry :(

edge
2nd May 2007, 00:04
Hans.. You got me thinking...

Yes. I did enable it a long time ago. It was set to:imap2 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/imapd (note the missing #<on># as it's not needed!)

Guess what.. The update from Sarge to Etch changed it back to
#<off># imap2 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/imapd

After restarting openbsd-inetd, all is working okay again :-)
netstat -tap | grep imap
tcp 0 0 *:imaps *:* LISTEN 27135/inetd
tcp 0 0 *:imap2 *:* LISTEN 27135/inetd

Now the next problem.. On the server that I did install the "Courier-IMAP/Courier-POP3" how can I go back again to the old setup without breaking to many things.

Do you think a simpe "apt-get remove courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0" will do the trick?



You can not use the commands

/etc/init.d/courier-imap restart
/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop restart

I know.. It was only there to show you that I did not have it installed

Hans
2nd May 2007, 00:35
Do you think a simpe "apt-get remove courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0" will do the trick?



Yes, i think you can do that.

edge
2nd May 2007, 12:30
Yes, i think you can do that.

Hmmm It's good I tested this on a VMware version. It removed more that I asked for, breaking the email part.

Lets retry again on a clean VMware version.