Cannot pass flags to spamc through spamass-milter service due to plugin own config handling

  • Hallo,


    wo kann ich das Limit für Nachrichten einstellen.


    Code
    1. spamc[15660]: skipped message, greater than max message size (512000 bytes)


    Ich erhalte immer mehr Spam-Nachrichten wo eine Grafik mit ca 800kb enthalten ist und diese wird demzufolge nicht rausgefiltert. Spamassassin Plugin ist installiert.

  • @Bulli


    See next posts...


    BTW: Next time please, post in the correct section. We have support section for plugins.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Error after plugin update:


    Code
    1. Plugin::SpamAssassin::change: Couldn't restart the `spamassassin' service: iMSCP::Provider::Service::Sysvinit::_exec: Job for spamassassin.service failed. See 'systemctl status spamassassin.service' and 'journalctl -xn' for details. at /var/www/imscp/engine/PerlLib/iMSCP/Service.pm line 227.


    Code
    1. systemctl status spamassassin.service● spamassassin.service - Perl-based spam filter using text analysis Loaded: loaded (/lib/systemd/system/spamassassin.service; enabled) Active: failed (Result: exit-code) since Mon 2017-06-19 10:07:55 CEST; 51s ago Process: 26537 ExecStart=/usr/sbin/spamd -d --pidfile=/var/run/spamassassin.pid $OPTIONS (code=exited, status=64) Main PID: 1023 (code=exited, status=0/SUCCESS)Jun 19 10:07:55 mail spamd[26537]: (filename) of a Unix socket. If port is omitted it defaults to --port orJun 19 10:07:55 mail spamd[26537]: to 783. Option --ssl implies a prefix 'ssl:'. An IPv6 address should beJun 19 10:07:55 mail spamd[26537]: enclosed in square brackets, e.g. [::1]:783, an IPv4 address may be butJun 19 10:07:55 mail spamd[26537]: need not be enclosed in square brackets. An asterisk '*' in place of aJun 19 10:07:55 mail spamd[26537]: hostname implies an unspecified address, ('0.0.0.0' or '::'), i.e. itJun 19 10:07:55 mail spamd[26537]: binds to all interfaces. An empty option value implies '*'. A default isJun 19 10:07:55 mail spamd[26537]: '--listen localhost', which binds to a loopback interface only.Jun 19 10:07:55 mail systemd[1]: spamassassin.service: control process exited, code=exited status=64Jun 19 10:07:55 mail systemd[1]: Failed to start Perl-based spam filter using text analysis.Jun 19 10:07:55 mail systemd[1]: Unit spamassassin.service entered failed state.

    syslog:


    Code
    1. Jun 19 10:06:31 mail systemd[1]: Stopping Perl-based spam filter using text analysis...
    2. Jun 19 10:06:31 mail spamd[1023]: spamd: server killed by SIGTERM, shutting down
    3. Jun 19 10:06:31 mail systemd[1]: Starting Perl-based spam filter using text analysis...
    4. Jun 19 10:06:32 mail spamd[26070]: Unknown option: max-size
    5. Jun 19 10:06:32 mail spamd[26070]: Usage:
    6. Jun 19 10:06:32 mail spamd[26070]: spamd [options]
  • @Bulli


    Show me your /etc/default/spamassassin configuration file please.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Bulli


    Ok, I've been bad in my previous post.. Options in /etc/default/spamassassin are for spamd and not spamc. Thus, we need to pass the option through spamass-milter. Give me few minutes to give your the right directives. And please, for now, revert ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Bulli


    See my previous post ;) I'll give you the right procedure in few minutes.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Bulli


    So, I've done a little test before writing some bullshit again (setting max size to 10 bytes max :D ). Result:


    Code
    1. ...Jun 19 08:49:41 srv01 spamc[26284]: skipped message, greater than max message size (10 bytes)...


    So how to process finally? As stated above, the parameter must be passed to spamc through spamass-milter service. So in the plugin configuration file you'll find the spamassMilterOptions configuration parameter. You must modify it as folllow:



    PHP
    1. ...
    2. 'spamassMilterOptions' => '-e -f -u spamass-milter -- --max-size=1000000',
    3. ...


    Once done, don't forget to trigger a plugin list update, else your changes won't be taken into account.


    You must remember that any option appearing after -- are passed to spamc. Regarding this, there is a bug in the plugin because it also add -- to pass flags to spamc without further checking. You must wait next SpamAssassin plugin version.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Bulli


    Sorry, the bug will affect you in fact... I need fix the SpamAssassin plugin first, else you'll have problem adding -- spamc_flags as shown above.


    Previous post edited.


    Thanks.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Bulli


    A new version is available which fix the problem described above.


    In order, you must:


    • Upload the new version (1.2.0)
    • Edit the plugin configuration file and change:


    PHP
    1. 'spamassMilterOptions' => '-e -f -u spamass-milter',

    by


    PHP
    1. 'spamassMilterOptions' => '-e -f -u spamass-milter -- --max-size=1000000',

    And finally, you must trigger a plugin list update through the plugin management interface.


    Thank you for your report.
    Thread closed.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206