Answer the question
In order to leave comments, you need to log in
How to automate iredmail address book?
Good afternoon.
There is an iredmail mail server (iredmail 0.9.6, iRedAdmin-Pro 2.6.0, Postfix 2.10.1, MySQL 5.5, roundcubemail-1.2.4).
The globaladdressbook plugin is connected to the roundcube web interface. But it only works with an existing address book.
Several domains are running on the mail server.
How can you create an address book that includes mailboxes of all domains on the server, automatically keep it up to date and, ideally, update the general book available to users through the WebUI?
Answer the question
In order to leave comments, you need to log in
In case someone came here looking for a solution to a similar question:
delete FROM roundcubemail.contacts WHERE (email LIKE '%@MYDOMAIN') AND (user_id=NUMBER);
CREATE TABLE roundcubemail.temp AS SELECT username, name, created, employeeid FROM vmail.mailbox;
INSERT INTO roundcubemail.contacts (name, email, surname, user_id) SELECT name, username, name, NUMBER FROM roundcubemail.temp;
drop TABLE roundcubemail.temp;
, where
NUMBER is the ID of the user who created the globaladdressbook;
roundcubemail.temp - temporary table for data migration.
You can do without a temp table, but I needed it to remove various technical addresses from the general directory so that they do not interfere with users.
The whole thing is in the script, and then in Cron.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question