[Dovecot] dovecot and vmailmgr
Mij
mij at bitchx.it
Sat May 13 00:11:47 EEST 2006
On 11/mag/06, at 11:09, Timo Sirainen wrote:
>> A better, general solution would be for dovecot to implement some
>> kind of general
>> rewriting, say with regexps and sed-like replacement rules, or with
>> an external process
>> in a cgi fashion.
>
> Hmm.. Actually I think it's already possible for you to return a new
> username in the checkpassword script by setting USER environment. You
> might need "EXTRA=USER" environment too.
if the mail address is joe.black at foo.com, the user is actually
joe.black, not
"joe:black".
For what concerns checkpassword, specifically, the interface spec is
very
clear about it: the mapping is black box, but if authentication
succeeds, your
"checkpassword-reply" program will get the mailbox path in form of the
current working directory. See http://cr.yp.to/checkpwd/interface.html .
In general, this decoupling is good. That is, it's good that the
authentication
module (or the userdb you use) compute the path on its own, in spite of
exporting pieces of data that the latter mailserver uses to build the
final path.
In the end, the Good Thing is to hold the final mailbox path in
auth_request, and
let the early passwd or userdb modules concern about this.
>> With this patch, dovecot gets the correct path for any user mailbox.
>> However, there's a bug
>> in dovecot storage modules (both maildir and mbox) which truncates
>> the path in the first ":",
>> when expecting ":INBOX" etc specifiers:
>
> Yes.. However I'm not sure if I want to do anything about this. I just
> didn't expect usernames to contain ':' characters, and adding extra
> checks to make this sort-of-work just feels like it's going to
> break at
> some point, more or less worse.
it's not usernames that contain ":".
Since is legal in path names to put colons, you're enabled and free
to choose
default_mail_env=/var/mailspace/remotes:imap/%u
Whatever the mail storage system is, ":" can just happen. Moreover,
this is
customary with qmail (see http://www.qmail.org/man/man5/dot-qmail.html )
> I guess I could give the "Maildir" parameter to checkpassword script
> anyway always.
it is bad to apply implementation-specific (rel to vmailmgr)
workarounds to
implementation-independent interfaces; however in your case, where the
child program is under your direct control, this should not bother.
More information about the dovecot
mailing list