I use qmail with a freemail system (webmail.dsmemo.com). Because I have a custom authentication system (I use a db), I tried to use a perl script to check login and password and this work well. The problem is that I never noticied about a pop3 server wich use a flexible authentication scheme (3 step) AND mailbox (not maildir). I think the alternative solution may be to modify other software, like qpopper, but if there is somewhat already made, would be the best :-))
