Author Topic: [0.2-stable] Several e-mail addresses per user set automatic by virtUser file  (Read 5736 times)

Offline Napsty

  • Jr. Member
  • **
  • Posts: 20
Hello

I've just tested a bit the functions with the virtUser file. Seems pretty nice to me.
But.. in my case I have several users on the server which have several e-mail addresses pointed to their user name.
With my tests, it worked for one e-mail address which was automatically added into the table identities.

Here an example of a virtUser file:
test1@domain.com unixuser1
test2@domain.com unixuser1
test3@domain.com unixuser1

You see three e-mail addresses pointing to the account unixuser1.

My request therefore is an automatic new entry into the table identities when a new e-mail address is detected for the same user.

If that already exists please let me know, maybe I've set a wrong config or something.

Offline Napsty

  • Jr. Member
  • **
  • Posts: 20
I've added this request to trac.roundcube.net.
The feature I would have wanted is already the original purpose of the handling of the virtUser file so there's obviously a bug.

#1485678 (Several e-mail addresses per user set automatically by virtUser file) ? RoundCube Webmail ? Trac

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Quote from: Napsty;16194
I've added this request to trac.roundcube.net.
The feature I would have wanted is already the original purpose of the handling of the virtUser file so there's obviously a bug.

#1485678 (Several e-mail addresses per user set automatically by virtUser file) ? RoundCube Webmail ? Trac
I don't think I'd consider it a bug. The virtuser function works perfectly for the way our system is configured - I have one single mail server with shared namespace which serves 8 different domains. My virtuser table has over 2000 user entries, but only one entry per user. When a user logs in, it compares the username with the virtuser table and creates the identity with the proper email address and domain from the virtuser file. So for me, the system works as described, and I suspect my situation is far more normal than yours is.

It will take a considerable code rewrite to do what you ask. You'd need to create a user account for the first entry, but then create additional Identities for additional virtuser entries. Far more complex.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline Napsty

  • Jr. Member
  • **
  • Posts: 20
Well yes it works of course for one entry but my server is a webhosting server and clients are allowed to create their own e-mail addresses. if they have several domains they want of course to have several email addresses pointing to their pop3/imap account.

The change is basically

if user has 1 entry
do the normal thing (add user into users table and into identities table)

else if user has >1 entry
do the normal thing for the first entry (add user into users table and into identities table) and add new identities for the other entries into the identities

That's the idea. I'm unfortunately not THAT good in programming to know exactly what to do.

I'm a bit confused now since I explained this in the ticket system and alec confirmed that it should be working as I want it.
#1485678 (Several e-mail addresses per user set automatically by virtUser file) ? RoundCube Webmail ? Trac

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
As I mentioned, I don't think its a bug, I think this is a feature request. Definitely could be done, but it would entail some work to implement.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA