Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared Contacts list empty for users - Cpanel installation #60

Open
noxxsan opened this issue May 23, 2024 · 1 comment
Open

Shared Contacts list empty for users - Cpanel installation #60

noxxsan opened this issue May 23, 2024 · 1 comment

Comments

@noxxsan
Copy link

noxxsan commented May 23, 2024

``Hi

Trying to install on cpanel but its not working.

Added new admins, imported contacts from csv file just fine, but when i log on user account i can see Shared Contacts but its empty, zero contacts

Any ideas?

Roundcube Release 1.6.0


`$config['globaladdressbooks']['global'] = [
// the name of the address book displayed to the user
'name' => 'Shared Contacts',

// the name of the dummy user which holds the global address book, if the user does not exist it will be created
// the name can contain the following macros that will be expanded as follows:
//      %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
//      %i is replaced with the domain part of the email address from the user's default identity
//      %h is replaced with the imap host (from the session info)
// eg. to create one global address book per domain: global_addressbook@%d
'user' => 'global_addressbook@%d',

// default user permissions
// 0 - global address book is read only
// 1 - users can add, edit and delete contacts (full permissions)
// 2 - users can add but not edit or delete contacts
// 3 - users can add and edit but not delete contacts
'perms' => 0,

// always copy contacts from the global address book to another address book, never move
'force_copy' => true,

// allow groups in global address book
'groups' => false,

// global address book admin user
// admin user(s) can always add/edit/delete entries, overrides readonly
// either a single username, or an array of usernames, see README for more info
'admin' => ['[email protected]', '[email protected]'],

// show addresses from the global address book in the auto complete menu when composing an email
'autocomplete' => true,

// check globaladdressbook for known senders when displaying remote inline images
'check_safe' => true,

// address book visibility
// null for visible to all or an array of usernames, see README for more info
'visibility' => null,

];

// activate GlobalAddressbook for selected mail hosts only. If this is not set all mail hosts are allowed.
// example: $config['globaladdressbook_allowed_hosts'] = ['mail1.domain.tld', 'mail2.domain.tld'];
$config['globaladdressbook_allowed_hosts'] = null;
`

@johndoh
Copy link
Owner

johndoh commented May 24, 2024

If you enable sql_debug in your Roundcube config then the queries that are being run to retrieve the contacts will be logged. First their will be queries like

SELECT * FROM `users` WHERE `mail_host` = 'localhost' AND `username` = '_global_addressbook_user_';
SELECT * FROM `contacts` AS c WHERE c.`del` <> 1 AND c.`user_id` = '??' ORDER BY CONCAT(c.`surname`, c.`firstname`, c.`name`, c.`email`) ASC LIMIT 50;

You have set user to 'global_addressbook@%d' could it be the admin user you used to do the import and the regular user you are using for testing are on different domains?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants