As I can see Dovecot is IMAP client. I have already set up Courier for that, and I'm just getting to know Courier. I see Dovecot is a bit smaller in memory footprint, but I have only one client (meself

), so thats not worth changing.
I did got the password lookup from my database working, but also after 2/3 days of trying and seeing a lot of tutorials.
Thats just the strange thing, PLAIN login works, so the module HAS the password.
I could use the IMAP authentication, which is I think the way it works with Dovecot? So the SMTP checks if there is an successful IMAP connection for those user/password combo? But then you can't change you query, so you can't specify which users can send mail trough your server or not, or add users who doesn't have a mailbox.
For my next installation I will use Dovecot, thanks for the tip!
But in this installation, I'm not goiing to change it anymore, I have put to many time to get this working

.
The CRAM MD5 is not that imported, but it would be nice to get it working.
Thanks for your replies, condate and jed.