Manage Confixx SpamAssassin User Settings in Roundcube

Written by - 0 comments

Published on - Listed in Internet PHP Mail Roundcube


In August 2010 I already wrote an article how to change Confixx email account passwords in Roundcube. Now it is time to continue the integration of Confixx into Roundcube.

As Confixx administrators know, there is a possibility to integrate SpamAssassin. Every Confixx user can adapt his own black- or whitelists, set the rewrite_subject options, and so on. But there is one big downside: The user needs to be logged into Confixx to make changes in his SpamAssassin settings. Wouldn't it be much simpler for the user to change these settings directly in his Roundcube Webmail, instead of having to log in to another web-application? The answer is yes.

There's a plugin called SpamAssassin User Prefs (short SAUserPrefs). This plugin is all you need to succeed, plus a few changes in the SQL privileges. I'll explain step by step.

1. Grant SQL permissions for Roundcube user
The Roundcube Webmail runs with its own database and usually with its own database user. If you're not sure anymore which SQL user your Roundcube installation uses, take a look at the config/db.inc.php file. In my example the username is roundcube.This database user need to have the following rights on the database confixx and on the table spamprefs: SELECT, INSERT (on username, preference and value) and DELETE.
So grant these permissions:

GRANT SELECT , INSERT( `username` , `preference` , `value` ) ,
DELETE ON `confixx`.`spampref` TO 'roundcube'@'localhost';


2. Download and unpack the plugin
Go to http://www.tehinterweb.co.uk/roundcube/#pisauserprefs  and download the plugin for your Roundcube version.
There are two versions available:
- 1.7 for Roundcube 0.5-beta or above
- 1.8 for Roundcube 0.8-beta or above
As of this writing, the current stable version is 0.7.2, the version 0.8 Release Candidate will be available soon. Download the right version according to your Roundcube version.
In my case I used 1.7 for a Roundcube installation running 0.7.2.

The content of the zip or tar.gz file must be uploaded or unpacked into the plugins folder of your Roundcube installation.

# cd /home/myroundcubeinstall/plugins
# wget http://www.tehinterweb.co.uk/roundcube/plugins/sauserprefs.tar.gz
# tar -xzf sauserprefs.tar.gz

So now you have a new folder called sauserprefs in your plugins folder.


3. Verify/set sauserprefs settings
The file called config.inc.php.dist in the sauserprefs folder must be named to config.inc.php.
Then open config.inc.php and adapt the settings to your Confixx installation.
The important settings are at the top of the file. The config array sauserprefs_db_dsnw needs to be adapted so it points to your Confixx database.
Furthermore you need to adapt the name of the table holding the SpamAssassin user settings. In Confixx this table is by default called spampref:

// spamassassin database settings
$rcmail_config['sauserprefs_db_dsnw'] = 'mysql://roundcube:mypass@localhost/confixx';

// table that holds user prefs
$rcmail_config['sauserprefs_sql_table_name'] = "spampref";

The other settings should be OK, but it doesn't hurt to verify the name of the fields. The Confixx table spampref should already use the correct column names (username, preference, value).


4. Activate the plugin
Open your config/main.inc.php configuration file and search for the plugins definition. Add sauserprefs to the array:

// ----------------------------------
// PLUGINS
// ----------------------------------

// List of active plugins (in plugins/ directory)
$rcmail_config['plugins'] = array('lang_sel','managesieve','sauserprefs');


5. Enjoy your SpamAssassin settings in Roundcube
Logged into Roundcube Webmail, a new tab called Spam is now shown in the Settings section.
Here you have the possibility to change general SpamAssassin settings and add e-mail addresses to your own white- or blacklist.

Roundcube Spam Assassin Settings


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Icingaweb   Icingaweb2   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder   


Update cookies preferences