SpamAssassin

  • (I hope this is the right place, if not please tell me where to ask these questions please.)


    I have the roundcube plugin and spamassassin plugin running. Both works fine. Yesterday I updated i-mscp and now I no longer have a Spam button inside Roundcube. Is there any instruction what to do to get it back?


    Second question: Is spam button only moving mail from inbox <-> junk?

  • I have the roundcube plugin and spamassassin plugin running. Both works fine. Yesterday I updated i-mscp and now I no longer have a Spam button inside Roundcube. Is there any instruction what to do to get it back?

    Try to deactivate the SpamAssassin plugin and activate it again and check if it solves your problem.


    Second question: Is spam button only moving mail from inbox <-> junk?

    No, it also feeds the SpamAssassin database with the Spam mail (sa-learn).

  • thx for you fast response!


    I tried to deactivate and reactivate spamassassin and roundcube plugin more than once. Also tried to find if there is a correct order but there is no change between activating roundcube or spamassassin first.

  • Please post the output of:


    Code
    1. ls -l /var/www/imscp/gui/plugins/SpamAssassin/roundcube-plugins
    2. ls -l /var/www/imscp/gui/public/tools/webmail/plugins
  • Also please post the config.php of your uploaded plugin..

  • ls -l /var/www/imscp/gui/plugins/SpamAssassin/roundcube-plugins

    Code
    1. insgesamt 8drwxr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 markasjunk2drwxr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 sauserprefs



    Code
    1. insgesamt 128dr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 acldr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 additional_message_headersdr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 archivedr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 attachment_reminderdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 autologondr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 database_attachmentsdr-xr-x--- 4 vu2000 vu2000 4096 Apr 27 02:57 debug_loggerdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 emoticonsdr-xr-x--- 7 vu2000 vu2000 4096 Apr 27 02:57 enigmadr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 example_addressbookdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 filesystem_attachmentsdr-xr-x--- 6 vu2000 vu2000 4096 Apr 27 02:57 helpdr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 hide_blockquotedr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 http_authenticationdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 identity_selectdr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 jqueryuidr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 legacy_browserdr-xr-x--- 6 vu2000 vu2000 4096 Apr 27 02:57 managesievedr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 markasjunkdr-xr-x--- 4 vu2000 vu2000 4096 Apr 27 02:57 newmail_notifierdr-xr-x--- 4 vu2000 vu2000 4096 Apr 27 02:57 new_user_dialogdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 new_user_identitydr-xr-x--- 6 vu2000 vu2000 4096 Apr 27 02:57 passworddr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 redundant_attachmentsdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 show_additional_headersdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 squirrelmail_usercopydr-xr-x--- 4 vu2000 vu2000 4096 Apr 27 02:57 subscriptions_optiondr-xr-x--- 4 vu2000 vu2000 4096 Apr 27 02:57 userinfodr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 vcard_attachmentsdr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 virtuser_filedr-xr-x--- 3 vu2000 vu2000 4096 Apr 27 02:57 virtuser_querydr-xr-x--- 5 vu2000 vu2000 4096 Apr 27 02:57 zipdownload



    PHP: /var/www/imscp/gui/plugins/SpamAssassin/config.php
    1. <?php/** * i-MSCP SpamAssassin plugin * Copyright (C) 2015 Laurent Declercq <[email protected]> * Copyright (C) 2013-2015 Rene Schuster <[email protected]> * Copyright (C) 2013-2015 Sascha Bay <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */return array( // // Below you can adjust the SpamAssassin configuration. // // For more information about the different configuration options please check the SpamAssassin documentation at: // http://spamassassin.apache.org/full/3.3.x/doc/ or http://spamassassin.apache.org/full/3.4.x/doc/ // // WARNING: Don't change anything, if you don't know what you are doing. // // Reject spam (default: not) // // If set to 'yes', the mails are rejected when they are detected as SPAM by SpamAssassin. // If set to 'no', the mails are no rejected but taggued as SPAM when they are deteced as SPAM by SpamAssassin. // // Note: Rejecting SPAMs is supported because the checks are done before the MTA accepts the mails (before-queue // filter with spamass-milter). 'reject_spam' => 'no', // Use bayes (default: yes) // // If set to 'yes', enable usage of the bayes database. // If set to 'no', disable usage of the bayes database. 'use_bayes' => 'yes', // Site wide bayes (default: no) // // If set to 'yes', global bayes database is activated. This allow to share the bayesian database with all users. 'site_wide_bayes' => 'no', // SA learn cronjob for learning about spam/ham (default: run every 12 hours) 'cronjob_bayes_sa-learn' => array( 'minute' => '*', 'hour' => '*/12', 'day' => '*', 'month' => '*', 'dweek' => '*' ), // SA learn cron job for cleaning the bayesian database (default: run once per day) 'cronjob_clean_bayes_db' => array( 'minute' => '@daily', 'hour' => '', 'day' => '', 'month' => '', 'dweek' => '' ), // Use auto whitelist (default: no) // // When set to 'yes', enable usage of the Auto-Whitelist (awl) factor. // When set to 'no', disable usage of the Auto-Whitelist (awl) factor. 'use_auto-whitelist' => 'no', // Cron job to cleanup the awl database from old entries (default: once per day) 'cronjob_clean_awl_db' => array( // See man CRONTAB(5) for allowed values 'minute' => '@daily', 'hour' => '', 'day' => '', 'month' => '', 'dweek' => '' ), // Razor2 (default: no) // // If set to 'yes', enable usage of razor2. // If set to 'no', disable usage of razor2. 'use_razor2' => 'yes', // Pyzor (default: no) // // If set to 'yes', enable usage of Pyzor. // If set to 'no', disable usage of Pyzor. 'use_pyzor' => 'yes', // DCC - Distributed Checksum Clearinghouse (default: no) // // If set to 'yes', enable usage of DCC. // If set to 'no', disable usage of DCC. 'use_dcc' => 'no', // RBL checks (default: no) // // If set to 'yes', enable RBL checks. // If set to 'no', disable RBL check. // // Note: You shouldn't enable this feature if you're already using PolicydWeight or Postscreen plugins. 'use_rbl_checks' => 'yes', // This plugin will try to guess the language used in the message text. 'use_lang_check' => 'no', // yes, no (default) // //// 3rd party SpamAssasin plugins // // DecodeShortURLs plugin (default: no) // // If set to 'yes', enable the DecodeShortURLs plugin. // If set to 'no', disable the DecodeShortURLs plugin. // // See https://github.com/smfreegard/DecodeShortURLs for further details. 'DecodeShortURLs' => 'no', // iXhash2 plugin (default: no) // // If set to 'yes', enable the iXhash2 plugin. // If set to 'no', disable the iXhash2 plugin. // // See http://mailfud.org/iXhash2/ for further details. 'iXhash2' => 'no', // //// Roundcube plugins // // markasjunk2 plugin (default: yes) // // If set to 'yes', enable the markasjunk2 roundcube plugin. // If set to 'no', disable the markasjunk2 roundcube plugin. // // The markasjunk2 roundcube plugin adds a new button to the mailbox toolbar, which allow the users to mark the // selected messages as Junk/Not Junk, optionally detaching original messages from spam reports if the message is // not junk and learning the bayesian database with junk/not junk. 'markasjunk2' => 'yes', // sauserprefs plugin (default: yes) // // If set to 'yes', enable the sauserprefs plugin. // If set to 'no', disable sauserprefs plugin. // // The sauserprefs roundcube plugin adds a 'Spam' tab to the 'Settings' in roundcube, which allow the users to // change their SpamAssassin preferences. SA user preference are stored inside the imscp_spamassassin database. 'sauserprefs' => 'yes', // Protected SA user preferences (default: '{headers}', 'use_razor1') // // Any user preference listed in that configuration parameter will be protected against overriding by users. See // Check webmail/plugins/sauserprefs/config.inc.php for list of available options. // // Don't change anything, if you don't know what you are doing. 'sauserprefs_dont_override' => "'{headers}', 'use_razor1'", // default: "'{headers}', 'use_razor1'" // //// SpamAssassin and spamass-milter configuration // 'spamassMilterOptions' => '-e -f -I -u spamass-milter', 'spamassMilterSocket' => '/var/spool/postfix/spamass/spamass.sock', 'spamassassinOptions' => '--max-children=5 --sql-config --nouser-config --username=debian-spamd --port=783 --helper-home-dir=/var/lib/spamassassin');



  • The Roundcube plugins markasjunk2 and sauserprefs are not in the Roundcube plugins folder /var/www/imscp/gui/public/tools/webmail/plugins and that is the reason why it is not working.


    I'll try to figure out how that could happen. Anything else what you maybe have changed or done? Any changes in the config.php file?

  • No really. I had some troubles updating from 1.2.16 to 1.2.17 (had to remove ServerDefaultPage plugin by hand using sql statements provided in this forum).
    Both plugins worked with excactly these configurations very well using 1.2.16 (and older).


    If you need some informatione please feel free to ask me, I respond as soon as possible.

  • To fix your problem please change at least one value in the config.php of SpamAssassin and click the button Update Plugins on the Admin panel.
    You could change it back afterwards and again don't forget to push the Update Plugins button.



    By the way, if I were you I would also activate this two options for SpamAssassin:

    Code
    1. 'DecodeShortURLs' => 'yes'
    2. 'iXhash2' => 'yes'
  • Hallo,


    when I activate spamassassin I see this in the logfile /var/log/mail.warn.


    Quote


    Jul 6 20:23:18 admin spamd[28135]: config: failed to load user (*****@gmail.com) scores from SQL database: config: SQL error: Access denied for user 'sa_user'@'localhost' (using password: YES)
    Jul 6 20:23:18 admin spamd[28135]: spamd: service unavailable: Error fetching user preferences via SQL
    Jul 6 20:24:13 admin spamd[28135]: config: failed to load user (*********@v-gn.de) scores from SQL database: config: SQL error: Access denied for user 'sa_user'@'localhost' (using password: YES)
    Jul 6 20:24:13 admin spamd[28135]: spamd: service unavailable: Error fetching user preferences via SQL


    I have deactivate Spamassassin and activate it but the same error.


    What can I do to solve this error ??


    Kind regards
    Viktor

    - Distribution: Debian | Release: 8.10 | Codename: jessie

    - i-MSCP Version: i-MSCP 1.5.3 | Build: 20180516 | Codename: Ennio Morricone

    - Plugins installed: ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), PanelRedirect (v 1.2.0) & SpamAssassin (v 2.0.1)

    - LetsEncrypt (v 3.6.0), PhpSwitcher (v 5.0.5), RoundcubePlugins (v 2.0.2)