DoK – Where Dreams Come From

C'è chi vede il bicchiere mezzo pieno e chi lo vede mezzo vuoto… Per me, l'acqua che manca, è traboccata fuori ;)

Qmailtoaster & Dovecot IMAP

Hi tech guys :)
After dome days of big bugs from my previous IMAP server (Courier 4.2.x – AUthlib 0.59.2), I decided to upgrade to last version available (Courier IMAP 4.4.1 – Authlib 0.61.0). I always installed package from qmail toaster, so I build a new .rpm and .srpm version for courier and authlib mantaining upstream qmailtoaster version.

After installation, I noticed something wrong :(
I got this strange error: “libauthvchkpw.so: cannot open shared object file: No such file or directory”.
Why ?!?!?!? Simply because vpopmail support is’nt available with authlib 0.61.0 (from 0.60.4) !!!!!
But all my installation support vpopmail !!!!! ARGHHHHHHHHHHHHHHHHHHHHHHHHHHHH !!!

Don’t worry Salvatore, don’t worry :) The only file you need is libauthvchpw.so :)
I copied it from previous installation and all was OK :)

But…. bugs are still present… GRRRRR… I need another IMAP server… DOVECOT !!!!!

Installation is very very simple (yum installer help a lot :) ). But now it’s time to configure and migrate.

First, simple step 😉 Migration is immediate. All you need is to add this commands on /etc/dovecot.conf:

mail_location = maildir:~/Maildir
mail_uid = 89
mail_gid = 89
first_valid_uid = 89
last_valid_uid = 89
first_valid_gid = 89
last_valid_gid = 89

so you can access previous receveid mail 😉 Remeber, on qmail-toaster vpopmail uid/gid is 89. If you want to known which userid/groupid is assigned to your user, you need to issue from shell:

id vpopmail

Ok, now the hard work. Now you need to integrate your vpopmail installation (auth module) with DOVECOT. First of all, you can’t use SQL access. With qmail-toaster all domains have a separate table. This is’nt a problem… Real problem is domain translation !!! You can’t use %d (DOVECOT variable) because domain is translated. For example, my domain ansani.it is stored like ansani_it.

And now ?!?!?!? Don’t worry, you can use vchkpw and checkpassword :)

Yes yes yes yes, on your auth default section, you need to write something like that:

auth default {
mechanisms = plain
 
passdb checkpassword {
args = /home/vpopmail/bin/vchkpw
}
 
userdb prefetch  {
args = uid=89 gid=89 home=/home/vpopmail/domains/%d/%u
}
 
count = 1
}

Remember again, I’ve installed qmail-toaster and my mails are on /home/vpopmail/domains/MY_EMAIL_DOMAINS/MY_USERNAME_/Maildir.

After this mod, all works ok :)

Enjoyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy :)

Regards,
Salvatore