How to enable automatic address book for roundcube

NethServer Version: 7
Module: Webmail

Hello,
is it possible to enable automatic saving of contacts in the address book in roundcube?

Francesco

Hi @tecklab,

yes, this is possible with following plugin: https://github.com/sblaisot/automatic_addressbook

You may also check following link for installing plugins: http://docs.nethserver.org/en/v7/webmail.html#plugins

I like that feature too so I just tested it and it worked so far:

wget https://github.com/sblaisot/automatic_addressbook/archive/0.4.3.tar.gz
tar -xf 0.4.3.tar.gz
mv automatic_addressbook-0.4.3 /usr/share/roundcubemail/plugins/automatic_addressbook
mysql roundcubemail < /usr/share/roundcubemail/plugins/automatic_addressbook/SQL/mysql.initial.sql
config setprop roundcubemail PluginsList "managesieve,markasjunk,automatic_addressbook"
signal-event nethserver-roundcubemail-update

After sending an email, the address is saved to the “Automatically Collected” address book:

grafik

5 Likes

hello and thanks for the support.
I tried as you say and everything works.

Thanks again

Hello
Francis

1 Like

Hello,
Thanks for your share! I want to add new guide for Cpanel v80. Because cpanel Roundcube plugin directory has been changed. So,

First run following command in ssh:

wget https://github.com/sblaisot/automatic_addressbook/archive/0.4.3.tar.gz

Second open zipped file:

tar -xf 0.4.3.tar.gz

Third run following mysql command in ssh

mysql roundcube</usr/local/cpanel/base/3rdparty/roundcube/plugins/automatic_addressbook/SQL/mysql.initial.sql

Finally open following file

/usr/local/cpanel/base/3rdparty/roundcube/config/config.inc.php

Find and edit following line as below (I added automatic_addressbook in the end)

// List of active plugins (in plugins/ directory)
$config[‘plugins’] = array(‘cpanellogin’,‘cpanellogout’,‘archive’,‘calendar’,‘automatic_addressbook’);

Thant is all!

Hi
I am facing error at
mysql roundcubemail < /usr/local/cpanel/base/3rdparty/roundcube/plugins/automatic_addressbook-0.4.3/SQL/mysql.initial.sql

ERROR 1049 (42000): Unknown database ‘roundcubemail’

Hi @Sarvesh_Sonawane,

welcome to Nethserver Community.

It seems you mixed the instructions for Nethserver and cpanel.

Nethserver:

cpanel:

In both cases Roundcube needs to be installed first to create the database.
As regards cpanel installation your Roundcube may have another database name.

How to install with SQLite?
Now Roundcube dont use MYSql more, data base was change to SQLite.
Can you hlp?

Hi Maximiliano (@Maximiliano_Grana_Di),

Welcome to the Nethserver Community

Are you sure you installed roundcube from the nethserver software-center?
As far as I know nethserver-roundcube setup uses mysql (mariadb) not SQLite.

Hi Mark,
I receive Roundcube with WHM and i see now default installation was SQLite and i cant change


Di not know what WHM is; do I understand correctly you do not use nethserver?

@mark_nl

WHM is part of CPanel it seems

Not NethServer


Haha, @Maximiliano_Grana_Di than I can not really answer you more than a direction: you probably need to use the sqlite.initial.sql which is included in the plugin.

OK perfect. Thanks.
But I’m sorry for my beginner’s doubt.
How do I run this file?
My main problem is this.
Where do I run? How do I access Roundcube’s SQLite to create these initial plugin tables?

Thank you for the patience.

I think you be better off asking your question where your cpanel/WHM is hosted.

or here ?:

1 Like

Hello Friend.
I was able to figure out how to solve this problem.
With the change of the MySQL database to SQLite all stored contacts that were collected automatically were lost to my customers.
This is also an issue if you migrate your hosting account from one server to another, as “collected contacts” are not migrated together,

The automatic_addressbook plugin stores contacts in another table at “collected_contacts”.

For those interested, I made a change to the /roundcube/plugins/automatic_addressbook/config.inc.php configuration file by changing line 10 of:
$ config [‘db_table_collected_contacts’] = ‘collected_contacts’;

for:
$ config [‘db_table_collected_contacts’] = ‘contacts’;

This causes the “collected contacts” to be automatically saved “in the same location” as the contacts saved by the user.
In my case, this is the same, after all what matters is that the contact is “suggested” when starting typing.

Another important point is that the “collected contacts” are now part of the customer’s address book that will be automatically backed up by WHM.

I hope this information helps.
Thanks,
Max

1 Like