I'm integrating ilohamail ( http://www.ilohamail.org ) into drupal as a module for my ISP's homepage ( http://www.pioneer-net.com ).
The biggest catch (I hope) is implementing an alt auth method for drupal, so that users who have email accounts with us will get a drupal account automagically on login.
Here's what I want:
When the user posts a login attempt, check against a list of usernames stored in a db table. If the name matches, use the custom auth through ilohamail. If the name doesn't match (or auth fails, possibly indicating that mail is down), authenticate normally.
I recognize that for most deployments, it will be fine to just have a webmail login block that users see if they have webmail permission. That's fine, and I will implement it. For my deployment though, I need the above behavior.
I've been messing around with user.module and hook_auth a bit (this is a mod for 4.5 btw - if using HEAD is a good idea for some reason, let me know), and it seems that custom auth methods are only tried if there is an @ sign in the username. I don't want users to log in as user@host, just as user. So I will have to modify this function, I think.
The other tricky thing is that I want drupal to set the password for the user's account to her mail password on successful mail auth. If the mail server goes down, she should still be able to access the website.
The immediate reason for this post is to solicit sources of further info (aside from API) on auth methods, as I can't find much, and also advice on implementation details, as I am a drupal n00b (been hacking on it for a month tho, so learning).