Well, I've royally messed up in that all of the users in our system are now identified by username@localhost, instead of using the domain. I enabled the virtuser_file plugin in 0.4-beta, and after working around a few errors, it now identifies the new users correctly. How do I tell roundcube to refill the identities table of all of the users that currently have an account?
In fact, Roundcube needs to check this every time the user logs in. Is this supported?
Our users can be modified in virtusertable at any time, though it shouldn't, so we need this to be dynamic. I don't see an option in config/main.inc.php.
On Fri, Jul 23, 2010 at 2:23 PM, Bradlee Landis bradleelandis@gmail.com wrote:
Well, I've royally messed up in that all of the users in our system are now identified by username@localhost, instead of using the domain. I enabled the virtuser_file plugin in 0.4-beta, and after working around a few errors, it now identifies the new users correctly. How do I tell roundcube to refill the identities table of all of the users that currently have an account?
-- Thanks, Brad Landis
In case someone else runs into this problem, and for my own future reference, here's a quick fix on MySQL. It needs to also pull the user's full name from /etc/passwd, but getting the email address correct was much more important at this point. This pulls *all* emails from /etc/mail/virtusertable.
echo "SELECT username FROM users" | mysql -p roundcubemail |
sed 's/^.*$/\s\0$/' > users.txt
grep -f users.txt /etc/mail/virtusertable > emails.txt
sed -rne 's/([^ ]*) *([^ ]*)/INSERT INTO identities
(user_id,standard,name,email,signature)
VALUES((SELECT user_id FROM users WHERE username="\2" LIMIT
1),1,"\2","\1","");/p'
emails.txt > identities.sql
sed '1iTRUNCATE TABLE identities;' identities.sql | mysql -p roundcubemail
I would still like it if roundcube would update the identites information on each login. Does anyone know how to make that happen?