On 15-03-05 10:20 AM, Glen Eustace wrote: > I have been experimenting with allowing any of a users email aliases to > be used to login. Using the login hook, I look up the address in our > database and return the appropriate user. Dovecot then does the > authentication. > > Unfortunately, I am now getting multiple local users for the same imap > mailbox. Is there anyway I can specify that local user so that I don’t > get a bunch of split personalities ?
try using the email2user hook: function init() { if ($rcmail->task == 'login') { $this->add_hook('email2user',array($this, 'email2user')); // rewrite user as true username (if logged in as alias) } } function email2user($p) { $realuser = alias_lookup($p['email']); $p['user'] = $aaa['account']; if ($p['email'] !== $realuser) { $p['email'] = $realuser; rcube::write_log('email2user', 'rewrote alias '.$p['email'].' to true account '.$p['user']); } return($p); } function alias_lookup($email) { // make $email the true address return $email; } _______________________________________________ Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev