View Full Version : Recent courier and authvchkpw don't work together
jherazob
04-23-2004, 02:28 PM
Hi. I just had done the typical apt-get update, that included updates for the courier stuff. When it finished it promptly announced that courier imap no longer would work with any authentication different from "authdaemon", and effectively logins stopped working.
I tried telling the daemon to use authvchkpw for authentication, and had the same result. Just to be sure i redownloaded it and updated the one running, restarted the services and tried again, with the same results.
I guess it needs to be updated. I wonder why this stuff happens exactly when you're almost done with something important... :roll:
So, any updates in sight?
krunk
06-27-2004, 08:35 PM
I think I may be suffering from this as well. I've been beating my head against the wall trying to figure out what I did wrong.
I get these errors in my mail.log:
Jun 27 18:08:48 tuxmac imaplogin: /usr/lib/courier/authlib/authvchkpw: Exec format error
natter
07-12-2004, 05:34 PM
Did anyone fix this? I'm doing a new install on Debian and can't get this to work either...
I followed: http://www.qmailrocks.org/imap_db.htm
and am getting this:
root>/etc/init.d# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK Courier-IMAP ready. Copyright 1998-2002 Double Precision, Inc. See COPYING for distribution information.
login natter@mydomain.com passwd
a NO Login failed.
Can I got back an older courier version? I don't know how to do that
using apt-get.
jherazob
07-16-2004, 02:42 PM
No solution yet, i had to revert to a complete system backup made with Mondo i had made a couple of days before the upgrade to revive imap, and because of that i'm running an old version of courier...
Right now there are no remote exploits/DoS attacks or something against that version, but if one appears i'm basically doomed.
I even started checking out other imap servers because of that, the one that has called my attention the most right now being Binc Imap, as it uses the checkpassword mechanism for authentication. That means that it can be started exactly as qmail-pop3 and that because of that we can use vchkpw and have instant vpopmail support. Also it's on Debian (package bincimap), but have yet to really test it, and it probably will need some manual tweaking to work with the rest of the system given the general attitude towards qmail in debian.
krunk
07-18-2004, 12:53 AM
mkdir -p /downloads/deb-source;cd /downloads/deb-source;apt-get source courier;apt-get build-dep;
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
automake1.8 defoma expect gs gs-common gs-gpl gsfonts libfam-dev libgimpprint1 libice6
libjpeg62 libnetpbm10 libpaper1 libperl-dev libpng12-0 libsasl2-dev libsm6 libtiff3g libxt6
mgetty mgetty-fax netpbm postgresql-dev tcl8.4
0 upgraded, 24 newly installed, 0 to remove and 3 not upgraded.
Need to get 13.0MB of archives.
After unpacking 34.7MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
cd courier-0.45.6.20040712/debian;vim rules;
search for --without-authvchkpw and delete that option.
cd ..;dpkg-buildpkg;cd ..;
**Edit** I did the above last night and still could not access ssl. Either my problem lies elsewhwere, or debian's tampering with the source was more in depth than a simple configur option. . .
*edit 2* After much fooling around with the rules and control options for debian, I just install courier-imap from source following the slackware instructions. It enabled me to dpkg --purge --force-depends all the exim4 packages and imap-ssl works now :)
beach478
07-25-2004, 01:42 PM
I was able to get courier imap working again after an apt-get upgrade,
After much playing around with reloading and looking at reinstalling, I found that the authmodulelist did not include the authuserdb module. so authdaemond was not looking at the userdb for the passwords.
I added authmodulelist.
----
##NAME: authmodulelist:0
#
# The authentication modules that are linked into authdaemond. The
# default list is installed. You may selectively disable modules simply
# by removing them from the following list. The available modules you
# can use are: authcustom authcram authuserdb authldap authmysql authpam
authmodulelist="authpam authuserdb"
##NAME: authmodulelistorig:1
#
# This setting is used by Courier's webadmin module, and should be left
# alone
authmodulelistorig="authcustom authcram authuserdb authldap authmysql authpam"
restarted /etc/init.d/courier-authdaemond
and Squirrelmail recognized the user passwords[/code]
chemosh
07-29-2004, 05:49 AM
can anyone confirm this solution or has found another one?
because I edited
/etc/courier/authdaemonrc
as mentioned above, but still i cannot login with squirrelmail or telnet and my syslog keeps saying
Jul 29 18:49:24 mephisto authdaemond.plain: authdaemon: modules="authpam authuserdb", daemons=5
Jul 29 18:49:30 mephisto imaplogin: Connection, ip=[::ffff:127.0.0.1]
Jul 29 18:49:57 mephisto imaplogin: LOGIN FAILED, ip=[::ffff:127.0.0.1]
Jul 29 18:49:59 mephisto imaplogin: LOGOUT, ip=[::ffff:127.0.0.1]
pnauroth
08-16-2004, 12:42 AM
I started with a clean install. No MTA was installed on the machine. When I apt-get the courier packages it installed exim4 (MTA) by default. I have read that qmail will not coexist well with another MTA. Once I stopped the exim4 service, I was able to send and receive mail from SM. Further, if you try to remove all the exim4 packages, the installer wants to remove courier as well (dependency exist between courier-imap-ssl, courier-imap and exim). Anyway check processes to make sure exim4 is not causing the problem. Good luck.
stormspotter
08-25-2004, 08:11 PM
I had this same problem the other day but assumed it was due to my 64 bit processor, based on some stuff I had been reading on the vchkpw mailing list. So, I compiled my own authvchkpw module and it works great.
You can find out if your problem is really with courier-imap or authvchkpw by running authvchkpw from the command line. If you run it from the command line with no options and it's working, you should get a single line back saying "AUTHFAILURE". If not, you'll get some error about it not working.
As someone else mentioned, you can download the Debian source for courier-imap, edit the debian/rules file in the courier-ver.sion.num.ber directory to change --without-authvchkpw to --with-authvchkpw and it will compile a new authvchkpw module for you. However, it does not seem to package the authvchkpw module with the rest of the .deb files after it compiles the module. So, before you delete the courier source directory, cp authlib/authvchkpw to /usr/lib/courier/authlib and then dpkg -i the new .deb packages.
You should now be good to go with working courier-imap from Debian and a good vpopmail installation.
HTH,
Jacob
acidburn
10-11-2005, 01:42 PM
i found some strange solution for the problem. copying /downloads/qmailrocks/scripts/misc/authvchkpw into /usr/lib/courier/authlib will solve the problem.
jlittle
09-01-2006, 11:20 AM
I also had the same problem, and had to download and recompile from source as above, but a bit diffrent.
For me, the libauthvchkpw was created from courier-authlib-dev (which has about 7 dependencies that I was able to apt-get install).
I had to change to --with-authvchkpw in the debian/rules
After doing a
dpkg-buildpackage -rfakeroot -uc -b
which did give an error, but only after it produced what I needed in /courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib:
libauthvchkpw.so libauthvchkpw.so.0 libauthvchkpw.so.0.0.0
I copied these to /usr/lib/courier-authlib and now,
instead of getting in /var/log/mail.log:
Aug 31 10:52:27 mail authdaemond: modules="authvchkpw", daemons=5
Aug 31 10:52:27 mail authdaemond: Installing libauthvchkpw
Aug 31 10:52:27 mail authdaemond: libauthvchkpw.so: cannot open shared object file: No such file or directory
I now get:
Sep 1 01:09:46 mail authdaemond: modules="authvchkpw", daemons=5
Sep 1 01:09:46 mail authdaemond: Installing libauthvchkpw
Sep 1 01:09:46 mail authdaemond: Installation complete: authvchkpw
And when testing the Imap, I get
a OK LOGIN Ok.
(And there was much rejoicing!)
Off to Part 13
meilon
10-22-2006, 11:14 AM
Sorry for pushing up this old thread, put I have a good addition in howto correct the courier in a good howto: http://www.debianhowto.de/doku.php/de:howtos:sarge:qmail
I Know its German, I'm German and if you only read the inout/todo stuff, you'll get to the result too
-meilon
kimbl
12-26-2006, 08:17 PM
Having foolishly set on an upgrade session with aptitude (It worked fine on the test server...) I've just hit the same problems.
For me, none of the "compile from source" methods worked. I'm sure I could have got to the bottom of it eventually, but I gave up with about three different versions of the sources (the original debian install, the new ("Sarge" version and the one from the Courier main site)
I just ducked it by using the userdb format in courier-imap (now listed as "preferred") and the excellent perl script vchkpw2userdb that comes with Courier-IMAP.
Whenever there's a password change I fire that off, then remake the db with "makeuserdb" and all is well. I can see it wouldn't work on 10,000 users, but for a few tens of users it works just fine - and it's certainly quicker than rebuilding courier from sources!
I'll now go and see what Vpopmail thinks of userdb databases - maybe the whole world's moved on...:)
w0ls0n
12-26-2006, 11:52 PM
Hello,
If you take a look at
http://freebsdrocks.net/index.php?option=com_content&task=view&id=33&Itemid=25
This is to use courier and authdaemond with daemontools on FreeBSD but can be used with basically flavor of Unix. I would skip down to where it says
Next we need to set up the daemontools directory structure for the courierpasswd service. I use /var/qmail/supervise as the physical location for my service directories, you can use whatever you like except that it cannot be /service itself. The examples below will assume you are using /var/service like I did- if you are using something different, adjust the paths where appropriate
and basically continue on from there. Please note to disable any startup scripts on your box so when you reboot your rc.d scripts and daemontools don't conflict.
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.