Topic: Roundcube address book
Hi all!
I'm interesting for this solution. I would like that all user's addressbook contains all user's name and e-mail addresses.
E.g.
I have 3 users in my domain:
jim@domain.com
johanna@domain.com
walter@domain.com
I would like jim's addressbook contains johanna's and walter's e-mail addresses.
Johanna's addr.book cont. jim and walter.... and so on.
For this reason this script?
I tried this script in phpmyadmin but doesn't work.
The output is:
-----------------------------------------------------
Error
SQL-query:
INSERTINTO roundcubemail.contacts(
CHANGED ,
del,
name,
email,
firstname,
surname,
user_id
)
SELECT CURDATE()AS
CHANGED ,'0' AS del, name, username, SUBSTRING_INDEX( username,'.', 1)AS firstname, SUBSTRING_INDEX( SUBSTRING_INDEX( username,'@', 1) ,'.' ,-1)AS lastname,'115' AS user_id
FROM vmail.mailbox;
The MySQL said:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`roundcubemail`.`contacts`, CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE)
-----------------------------------------------------
Do not fully understand what is the "user_id = 115".
Somebody can help for me?
Thanks.
PS: Sorry of my bad English.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.