On Thu, 16 Jun 2005, Timo Sirainen wrote:
Seems to me the only truly universal solution is to do this inside dovecot. It already has code to mangle the username with modifiers for mailspool location, so applying the same code to allow modifying username would seem to be a logical and consistent extension of existing dovecot behavior. That's assuming that the code for stripping domain away from username is useful for more than one or two people. I'm not really convinced of
On Wed, 2005-06-15 at 13:11 -0700, Dan Hollis wrote: that. There may be a way to make this possible in some generic way by adding a feature that make this possible, but a strip_domain_from_username=yes setting just isn't going to happen.
Think along the lines of reusing the existing dovecot code for mangling usernames into mailbox names:
default_mail_env = maildir:/var/mail/%Lu/%u/Maildir
would be something like this to strip the domain:
auth_passdb = passwd uname=%Ln
So not only does it use already existing dovecot code to process usernames, it also uses existing dovecot syntax, existing dovecot modifiers and does it in a generic way totally consistent with existing dovecot behavior.
-Dan