On Tue, 2006-04-11 at 09:36 -0500, Netlink Tech wrote:
Hello, Running FC5 x86_64 with dovecot-1.0-0_8.beta3.rhfc5.at Using system user/passwds for 99.99% of users...have sql user/pass enabled to test virtual users from mysql.
How do I strip off the domain when users provide user@domain.com so that my userdb and passdb use just 'user'? (disregarding sql auth...I'm not concerned with that right now).
In general I don't see this as very useful feature. Why are your users logging in with @domain? Or why not change your passdbs/userdbs to just contain the domain, and set auth_default_realm so everyone always logs in with domains?
My dovecot.conf auth config:
passdb pam { args = dovecot }
Here you could use some PAM plugin to strip it. I've no idea if such exists though.
passdb sql { args = /etc/dovecot-sql.conf }
Here you can modify your SQL command to use %n instead of %u.
userdb passwd { }
If the PAM plugin which strips the domain from username does it properly, it should have returned the new username to Dovecot and this should work..
userdb sql { args = /etc/dovecot-sql.conf }
And here again you can use %n.