Error at spam policy page.

Discussion in 'ISPConfig 3 Priority Support' started by pvanthony, Mar 6, 2020.

  1. pvanthony

    pvanthony Member HowtoForge Supporter

    Email > Spamfilter > Policy.
    Then click on the policy Uncensored
    Next go to each tab.
    Policy tab then Amavis tab then Rspamd tab
    The following error appears.
    Incorrect decimal value: '' for column `dbispconfig`.`spamfilter_policy`.`spam_dsn_cutoff_level` at row 1
    Can others check to see if there is this same problem?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, there is an issue indeed. The cutoff level fields may not be empty, they must contain a number like 0 or 0.00
     
  3. pvanthony

    pvanthony Member HowtoForge Supporter

    Ok. I have just entered 0.0 in the cut off field for amavisd.
    Now it seem ok. No more error.
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    FWIW, the default schema creates spamfilter_policy's with NULL in spam_dsn_cutoff_level, so simply editing one of those will trigger this error on a clean install:
    Code:
    MariaDB [dbispconfig]> select id, policy_name, spam_dsn_cutoff_level from spamfilter_policy;
    +----+----------------+-----------------------+
    | id | policy_name    | spam_dsn_cutoff_level |
    +----+----------------+-----------------------+
    |  1 | Non-paying     |                  0.00 |
    |  2 | Uncensored     |                  NULL |
    |  3 | Wants all spam |                  NULL |
    |  4 | Wants viruses  |                  NULL |
    |  5 | Normal         |                  0.00 |
    |  6 | Trigger happy  |                  NULL |
    |  7 | Permissive     |                  NULL |
    +----+----------------+-----------------------+
    7 rows in set (0.001 sec)
    
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so we should adjust the ispconfig3.sql file for 3.2.
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Or allow an empty value in the ui, as in a little research it appears to be valid if the cutoff levels are unset (which is confirmed by use of any of those policies).
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Also an update in incremental file. Changing the schema to not null, and default of 0.00 should update all existing policies (if that's a better solution than allowing them to remain unset).
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    We have to keep in mind that a lot of users delete the default policy's, not sure if a error would cause issues.
     

Share This Page