PHPackages                             johndoh/sauserprefs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. johndoh/sauserprefs

ActiveRoundcube-plugin[Utility &amp; Helpers](/categories/utility)

johndoh/sauserprefs
===================

Control SpamAssassin settings from within Roundcube

1.21(4mo ago)583.6k17GPL-3.0-or-laterPHPPHP &gt;=8.1.0

Since May 19Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/johndoh/roundcube-sauserprefs)[ Packagist](https://packagist.org/packages/johndoh/sauserprefs)[ Docs](https://github.com/johndoh/roundcube-sauserprefs/)[ RSS](/packages/johndoh-sauserprefs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (24)Used By (0)

Roundcube Webmail SAUserPrefs
=============================

[](#roundcube-webmail-sauserprefs)

This plugin adds the ability for users to edit they SpamAssassin user prefs from within Roundcube. It interacts with preferences storied in a database via SQL. For more information on setting up SpamAssassin to work with a database please see the [SpamAssassin Wiki](https://wiki.apache.org/spamassassin/UsingSQL).

Inspiration for this plugin was taken from: [WebUserPrefs](https://sourceforge.net/projects/webuserprefs/)

ATTENTION
---------

[](#attention)

This is just a snapshot from the GIT repository and is **NOT A STABLE version of SAUserPrefs**. It is Intended for use with the **GIT-master** version of Roundcube and it may not be compatible with older versions. Stable versions of SAUserPrefs are available from the [Roundcube plugin repository](https://plugins.roundcube.net/#/packages/johndoh/sauserprefs)(for 1.0 and above) or the [releases section](https://github.com/johndoh/roundcube-sauserprefs/releases) of the GitHub repository.

Requirements
------------

[](#requirements)

- [Roundcube jQueryUI plugin](https://github.com/roundcube/roundcubemail/tree/master/plugins/jqueryui)
- SpamAssassin 3.0 or above

License
-------

[](#license)

This plugin is released under the [GNU General Public License Version 3+](https://www.gnu.org/licenses/gpl.html).

Even if skins might contain some programming work, they are not considered as a linked part of the plugin and therefore skins DO NOT fall under the provisions of the GPL license. See the README file located in the core skins folder for details on the skin license.

Install
-------

[](#install)

- Place this plugin folder into plugins directory of Roundcube
- Add sauserprefs to $config\['plugins'\] in your Roundcube config

**NB:** When downloading the plugin from GitHub you will need to create a directory called sauserprefs and place the files in there, ignoring the root directory in the downloaded archive.

Config
------

[](#config)

The default config file is plugins/sauserprefs/config.inc.php.dist Rename this to plugins/sauserprefs/config.inc.php

- You must set the database connection string
- Enter the table name, name of the username field, preference field, and value field

SpamAssassin v4
---------------

[](#spamassassin-v4)

To enable support for SpamAssassin v4 set `$config['sauserprefs_sav4'] = true;`in your config file. This replaces old rule names such as `whitelist_from` with with their v4 equivalent automatically. Note: Some default prefs in your config file may need to be updated. See SpamAssassin docs for more details.

Supported languages for ok\_languages option
--------------------------------------------

[](#supported-languages-for-ok_languages-option)

Taken from Mail::SpamAssassin::Plugin::TextCat

- af - Afrikaans
- am - Amharic
- ar - Arabic
- be - Byelorussian
- bg - Bulgarian
- bs - Bosnian
- ca - Catalan
- cs - Czech
- cy - Welsh
- da - Danish
- de - German
- el - Greek
- en - English
- eo - Esperanto
- es - Spanish
- et - Estonian
- eu - Basque
- fa - Persian
- fi - Finnish
- fr - French
- fy - Frisian
- ga - Irish Gaelic
- gd - Scottish Gaelic
- he - Hebrew
- hi - Hindi
- hr - Croatian
- hu - Hungarian
- hy - Armenian
- id - Indonesian
- is - Icelandic
- it - Italian
- ja - Japanese
- ka - Georgian
- ko - Korean
- la - Latin
- lt - Lithuanian
- lv - Latvian
- mr - Marathi
- ms - Malay
- ne - Nepali
- nl - Dutch
- no - Norwegian
- pl - Polish
- pt - Portuguese
- qu - Quechua
- rm - Rhaeto-Romance
- ro - Romanian
- ru - Russian
- sa - Sanskrit
- sco - Scots
- sk - Slovak
- sl - Slovenian
- sq - Albanian
- sr - Serbian
- sv - Swedish
- sw - Swahili
- ta - Tamil
- th - Thai
- tl - Tagalog
- tr - Turkish
- uk - Ukrainian
- vi - Vietnamese
- yi - Yiddish
- zh - Chinese (both Traditional and Simplified)
- zh.big5 - Chinese (Traditional only)
- zh.gb2312 - Chinese (Simplified only)

Changing the order of the sections
----------------------------------

[](#changing-the-order-of-the-sections)

To change the order of the sections add a sections attribute with the sections listed in the desired order to the sasectionslist object in skins/\[skin\]/templates/sauserprefs.html. For example:

```

```

Delete user bayesian data stored in database
--------------------------------------------

[](#delete-user-bayesian-data-stored-in-database)

If the bayesian data is stored in the same database as the user prefs then it is possible for users to delete their data from the UI. See config file for example SQL

"SERVICE CURRENTLY NOT AVAILABLE! Error No. \[500\]" Error Message
------------------------------------------------------------------

[](#service-currently-not-available-error-no-500-error-message)

On some setups users might see "SERVICE CURRENTLY NOT AVAILABLE! Error No. \[500\]" shows up at the top of the sauserprefs screen. In this case there could be a problem with the database connection. Try adding ?new\_link=true to the end of the sauserprefs DSN in the config file. For example:

```
$config['sauserprefs_db_dsnw'] =
'mysql://username:password@localhost/database?new_link=true';
```

sauserprefs\_save hook
----------------------

[](#sauserprefs_save-hook)

Before prefs are saved to the database the plugin hook sauserprefs\_save is executed, this allows you to perform any custom actions like extra validation or setting specific values. Arguments:

- section: (string) current prefs section
- cur\_prefs: (array) the current user preferences
- new\_prefs: (array) the new preferences
- global\_prefs: (array) the global preferences

Return:

- new\_prefs: (array) the new preferences
- abort: (boolean) if true the prefs will not be saved
- message: (string) optional reason why the prefs were not saved which will be shown to the user

sauserprefs\_sections\_list hook
--------------------------------

[](#sauserprefs_sections_list-hook)

This allows you to modify the sections list. Arguments:

- list: (array) the current setions array
- cols: (array) column names to display

Return:

- list: (array) the new setions array
- cols: (array) column names to display

sauserprefs\_section\_name hook
-------------------------------

[](#sauserprefs_section_name-hook)

This allows you to modify the title displayed at top of the preferences screen. Arguments:

- section: (string) selected section of the prefs
- title: (string) the title for the current section

Return:

- title: (string) the title for the current section

sauserprefs\_list hook
----------------------

[](#sauserprefs_list-hook)

This allows you to modify the elements of the preferences screen before they are displayed. Arguments:

- section: (string) selected section of the prefs
- block: (array) array containing preferences blocks/options

Return:

- block: (array) array containing preferences blocks/options

Replacing the storage class
---------------------------

[](#replacing-the-storage-class)

To replace the default sql storage class with your own you need to set a special config options:

- sauserprefs\_storage: (string) the suffix of the storage class e.g. 'sql' for the default sql storage class The Roundcube config object is passed to the constructor of the class

Overriding SpamAssassin test scores
-----------------------------------

[](#overriding-spamassassin-test-scores)

An additional "Test Scores" section can be added to the UI to allow overriding of default test scores (e.g. `score A_HREF_TO_REMOVE 2.0`). To do this add the scores to the `sauserprefs_default_prefs` array. For example:

```
$config['sauserprefs_default_prefs'] = [
  ...
  'score SYMBOLIC_TEST_NAME' => 2.0,
];
```

Customizing the Elastic skin
----------------------------

[](#customizing-the-elastic-skin)

The colors and styles used by this plugin can be overridden by adding a `_custom.less` file to the `skins/elastic` sub-folder of this plugin and then recompiling the CSS.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity35

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~306 days

Recently: every ~464 days

Total

16

Last Release

140d ago

PHP version history (4 changes)1.11PHP &gt;=5.2.1

1.18.3PHP &gt;=5.4.0

1.19PHP &gt;=7.0

1.21PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/db409b928852344aac3d851f33b7f1412026cddfc8a9a258a52d11af1ec23ca5?d=identicon)[johndoh](/maintainers/johndoh)

---

Top Contributors

[![johndoh](https://avatars.githubusercontent.com/u/88682?v=4)](https://github.com/johndoh "johndoh (396 commits)")[![alecpl](https://avatars.githubusercontent.com/u/546788?v=4)](https://github.com/alecpl "alecpl (1 commits)")[![dicea-unipd](https://avatars.githubusercontent.com/u/62897774?v=4)](https://github.com/dicea-unipd "dicea-unipd (1 commits)")[![edvMKA60](https://avatars.githubusercontent.com/u/20205128?v=4)](https://github.com/edvMKA60 "edvMKA60 (1 commits)")[![michalac](https://avatars.githubusercontent.com/u/30258711?v=4)](https://github.com/michalac "michalac (1 commits)")

---

Tags

preferencesspamassassin

### Embed Badge

![Health badge](/badges/johndoh-sauserprefs/health.svg)

```
[![Health](https://phpackages.com/badges/johndoh-sauserprefs/health.svg)](https://phpackages.com/packages/johndoh-sauserprefs)
```

###  Alternatives

[roundcube/carddav

CardDAV adapter for connecting to CardDAV-enabled addressbooks

28155.3k](/packages/roundcube-carddav)[tatter/settings

Lightweight settings management for CodeIgniter 4

239.9k3](/packages/tatter-settings)[johndoh/globaladdressbook

Adds global address books to Roundcube

706.0k](/packages/johndoh-globaladdressbook)[jfcherng-roundcube/show-folder-size

A Roundcube plugin which shows folder size.

2515.2k](/packages/jfcherng-roundcube-show-folder-size)[kolab/calendar

Calendar plugin

3010.5k](/packages/kolab-calendar)[johndoh/swipe

Adds swipe actions to the message list of Roundcube

115.3k](/packages/johndoh-swipe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
