Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Password plugin and Virtualmin not working as expected #4336

rcubetrac opened this Issue Sep 13, 2013 · 7 comments


None yet
1 participant

Reported by mrspider on 13 Sep 2013 23:21 UTC as Trac ticket #1489332

This is almost the same issue as #1488001 which was never fixed.

The problem is when you have usernames like:
and your domain is

The standard case 8 doesn't work anymore because the user doesn't have the alias data.

case 8: // domain taken from alias, username left as it was
  $email = $rcmail->user->data[ $domain = substr(strrchr($email, "@"), 1);

The only place where the domain can be found are the identities.

== Proposed fix ==

$email = $rcmail->user->data['alias']('alias'];


$email = $rcmail->user->get_identity()['email'];

Keywords: password, virtualmin
Migrated-From: http://trac.roundcube.net/ticket/1489332

Milestone changed by @alecpl on 14 Sep 2013 06:54 UTC

later => 0.9.5

Comment by @alecpl on 15 Sep 2013 07:18 UTC

We cannot depend on alias any more. In 1f22878 I removed this option. Using identities might be not perfect solution. Do we have other options?

Comment by @alecpl on 15 Sep 2013 07:30 UTC

How about using mail_domain option? I'm talking about:

if (!$domain) {
    $domain = $rcmail->user->get_username('domain');

Comment by mrspider on 15 Sep 2013 12:02 UTC

The get_username function gets the domain either through the username or through the mail_host in the user table (which at least in my setup seems to be localhost).

So the only place the domain is available is the identity.

Comment by @alecpl on 16 Sep 2013 07:23 UTC

It gets domain from mail_domain configuration. This setting is used to form e-mail addresses on first login. So, I think this is what should be used in our case.

Comment by @alecpl on 23 Sep 2013 09:43 UTC

Applied in 0b17aae.

Status changed by @alecpl on 23 Sep 2013 09:43 UTC

new => closed

@rcubetrac rcubetrac closed this Sep 23, 2013

@rcubetrac rcubetrac added this to the 0.9.5 milestone Mar 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment