Error creating new Email > Spamfilter > Policy

Discussion in 'General' started by Bocki, Aug 18, 2023.

  1. Bocki

    Bocki Member HowtoForge Supporter

    Hello,
    when I click Email > Spamfilter > Policy > Add Policy record, enter some "Policy Name", change to "Rspamd" tab and back to either "Amavis" or "Policy" tab without entering any information I get the following error:
    Code:
    Incorrect decimal value: '' for column `dbispconfig`.`spamfilter_policy`.`rspamd_spam_greylisting_level` at row 1
    That's probably a bug?
    Thanks for helping!
    ISPConfig 3.2.11 on Debian 12 Bookworm
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Try Internet Search Engines with
    Code:
    site:howtoforge.com Incorrect decimal value: '' for column `dbispconfig`.`spamfilter_policy`.`rspamd_spam_greylisting_level` at row 1
    Are you sure ISPConfig is version 3.2.11? That bug was supposed to have been fixed already.
    To get some context, follow these instructions:
    https://forum.howtoforge.com/threads/please-read-before-posting.58408/
    Have you changed mariadb version?
     
  3. Bocki

    Bocki Member HowtoForge Supporter

    Thanks for your reply. Unfortunately Google produces zero results with the suggested search term. But I did indeed search beforehand with Google, I think with
    Code:
    Incorrect decimal value rspamd_spam_greylisting_level
    Unfortunately that did not provide a helpful answer, too. That's why I asked here.
    After your hint I tried Bing now. That does show up some results. Maybe I oversee something but it boils down to the question "is the latest ISPConfig version installed?". And to that question please see below:

    I'm quite sure that the ISPConfig version is 3.2.11 as that's the first one compatible with Debian 12. I installed it a few days back with
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --debug --use-php=8.1,8.2 --use-ftp-ports=50000-50100 --use-certbot --no-roundcube --no-pma --no-mailman --ssh-permit-root=no --ssh-password-authentication=no --ssh-harden
    I did not change anything about the automatically installed MariaDB.
    After that I migrated the data over with the Migration Toolkit from an older version of ISPConfig (unfortunately I don't have the version number anymore).

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 12 (bookworm)
     
    [INFO] uptime:  07:03:32 up 5 days, 13:47,  2 users,  load average: 0,03, 0,01, 0,00
     
    [INFO] memory:
                  gesamt       benutzt     frei      gemns.  Puffer/Cache verfügbar
    Speicher:      7,8Gi       2,9Gi       434Mi        79Mi       4,8Gi       4,9Gi
    Swap:          951Mi        87Mi       864Mi
     
    [INFO] systemd failed services status:
      UNIT                          LOAD   ACTIVE SUB    DESCRIPTION
    ● clamav-clamonacc.service      loaded failed failed ClamAV On-Access Scanner
    ● [email protected] loaded failed failed Advanced key-value store (instance)
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    2 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.11
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.2.8
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.2.8
    
    ##### PORT CHECK #####
    
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 1085440)
    [INFO] I found the following mail server(s):
            Postfix (PID 1534)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 709)
    [INFO] I found the following imap server(s):
            Dovecot (PID 709)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 238735)
    
    ##### LISTENING PORTS #####
    Server)         ()
    Local           (Address)
    [localhost]:53          (714/named)
    [localhost]:53          (714/named)
    [localhost]:53          (714/named)
    [localhost]:53          (714/named)
    [localhost]:953         (714/named)
    [localhost]:953         (714/named)
    [localhost]:953         (714/named)
    [localhost]:953         (714/named)
    [anywhere]:3306         (203532/mariadbd)
    ***.***.***.***:53              (714/named)
    ***.***.***.***:53              (714/named)
    ***.***.***.***:53              (714/named)
    ***.***.***.***:53              (714/named)
    [localhost]:5766                (197590/turnserver)
    [localhost]:10023               (642/postgrey)
    ***.***.***.***:3478            (197590/turnserver)
    ***.***.***.***:3478            (197590/turnserver)
    ***.***.***.***:3478            (197590/turnserver)
    ***.***.***.***:3478            (197590/turnserver)
    [localhost]:6379                (717/redis-server)
    [localhost]:11211               (713/memcached)
    [localhost]:11332               (886/rspamd:)
    [localhost]:11333               (886/rspamd:)
    [localhost]:11334               (886/rspamd:)
    [anywhere]:995          (709/dovecot)
    [anywhere]:993          (709/dovecot)
    [anywhere]:587          (1534/master)
    [anywhere]:22           (2426/sshd:)
    [anywhere]:21           (238735/pure-ftpd)
    [anywhere]:25           (1534/master)
    [anywhere]:110          (709/dovecot)
    [anywhere]:4190         (709/dovecot)
    [anywhere]:143          (709/dovecot)
    *:*:*:*::*:10023                (642/postgrey)
    *:*:*:*::*:8081         (1085440/apache2)
    *:*:*:*::*:8080         (1085440/apache2)
    *:*:*:*::*:3306         (203532/mariadbd)
    *:*:*:*::*:953          (714/named)
    *:*:*:*::*:953          (714/named)
    *:*:*:*::*:953          (714/named)
    *:*:*:*::*:953          (714/named)
    *:*:*:*::*:53           (714/named)
    *:*:*:*::*:53           (714/named)
    *:*:*:*::*:53           (714/named)
    *:*:*:*::*:53           (714/named)
    *:*:*:*::*f427:c2ff:fe71:53             (714/named)
    *:*:*:*::*f427:c2ff:fe71:53             (714/named)
    *:*:*:*::*f427:c2ff:fe71:53             (714/named)
    *:*:*:*::*f427:c2ff:fe71:53             (714/named)
    *:*:*:*::*:11333                (886/rspamd:)
    *:*:*:*::*:11332                (886/rspamd:)
    *:*:*:*::*:11334                (886/rspamd:)
    *:*:*:*::*:995          (709/dovecot)
    *:*:*:*::*:993          (709/dovecot)
    *:*:*:*::*5:53          (714/named)
    *:*:*:*::*5:53          (714/named)
    *:*:*:*::*5:53          (714/named)
    *:*:*:*::*5:53          (714/named)
    *:*:*:*::*:587          (1534/master)
    *:*:*:*::*:443          (1085440/apache2)
    *:*:*:*::*:22           (2426/sshd:)
    *:*:*:*::*:21           (238735/pure-ftpd)
    *:*:*:*::*:25           (1534/master)
    [localhost]10           (709/dovecot)
    *:*:*:*::*:80           (1085440/apache2)
    *:*:*:*::*:4190         (709/dovecot)
    [localhost]43           (709/dovecot)
    *:*:*:*::*:6379         (717/redis-server)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    f2b-sshd   6    --  [anywhere]/0            [anywhere]/0            multiport dports 22
    f2b-dovecot  6    --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993,587,465,4190
    f2b-nextcloud-redacted  6    --  [anywhere]/0            [anywhere]/0            multiport dports 80,443
    f2b-ispconfig  6    --  [anywhere]/0            [anywhere]/0            multiport dports 8080
    f2b-postfix-sasl  6    --  [anywhere]/0            [anywhere]/0            multiport dports 25
    f2b-wordpress-redacted  6    --  [anywhere]/0            [anywhere]/0            multiport dports 80,443
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain f2b-dovecot (1 references)
    target     prot opt source               destination        
    RETURN     0    --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-ispconfig (1 references)
    target     prot opt source               destination        
    RETURN     0    --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-nextcloud-redacted (1 references)
    target     prot opt source               destination        
    RETURN     0    --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-postfix-sasl (1 references)
    target     prot opt source               destination        
    RETURN     0    --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination        
    RETURN     0    --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-wordpress-redacted (1 references)
    target     prot opt source               destination        
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***           [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***          [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***           [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     0    --  [anywhere]/0            [anywhere]/0          
    
    
    
    
    ##### LET'S ENCRYPT #####
    Certbot is installed in /usr/bin/letsencrypt
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I never use Google, and duckduckgo.com found several articles. But I would assume Google would find same articles, something is strange.
    Is database server the default that came with Debian Bookworm?
    Is it on purpose that e-mail with SSL smtps is left out?
    Could it be the database on old ISPConfig was corrupted? Migration toolkit should convert database format. Did you see errors in migration log?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you use the Migration Tool or ISPCopy? If you used ISPCopy, then you probably copied the error from old server over to the new system. Migration Tool can fix such issues by importing data into the new database, but if values are wrong in a custom policy on the old system, then this must be fixed manually anyway.

    To fix your system, you must enter correct values for policy, if I search gole for "ispconfig Incorrect decimal value rspamd_spam_greylisting_level" then it returns the thread dealing with this:

    https://forum.howtoforge.com/threads/ispconfig-problem-with-email-spamfilter-policy-error.89198/

    Basically, you have to change the null values in spamfilter_policy table column rspamd_spam_greylisting_level from 'null' to 0 using phpmyadmin.
     
  6. Bocki

    Bocki Member HowtoForge Supporter

    Yes, it is:
    Code:
    $ apt-cache showpkg mariadb-server
    Package: mariadb-server
    Versions:
    1:10.11.3-1 (/var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_main_binary-amd64_Packages) (/var/lib/dpkg/status)
    No, it is not. This is the state after installation without manual changes to Postfix other than the certificate used. Should I change something?
    That might be the case. But during migration I just saw an error regarding an empty domain entry, which I could solve with Till's help. Nothing more.
    I used the Migration Tool, not ISPCopy.
    There were some entries with "NULL" in rspamd_spam_greylisting_level, but just new ones which were created during my tests. The default entries all show "0". I deleted the test entries now completely.
    But I figure when I would create new entries, I would have the same problem again so I think there might be a bug in the value handling nevertheless?
    spam_dns_cutoff_level does have "NULL" entries for me, too. Is that correct?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Sending over TLS happens on port 587 normally today and that port is open. But you can enable smtps in addition to that in master.cf if you want.

    I'll check that.
     
  8. Bocki

    Bocki Member HowtoForge Supporter

    Thank you very much, Till! :)
    For your reference my table content in CSV:
    Code:
    "id","sys_userid","sys_groupid","sys_perm_user","sys_perm_group","sys_perm_other","policy_name","virus_lover","spam_lover","banned_files_lover","bad_header_lover","bypass_virus_checks","bypass_spam_checks","bypass_banned_checks","bypass_header_checks","spam_modifies_subj","virus_quarantine_to","spam_quarantine_to","banned_quarantine_to","bad_header_quarantine_to","clean_quarantine_to","other_quarantine_to","spam_tag_level","spam_tag2_level","spam_kill_level","spam_dsn_cutoff_level","spam_quarantine_cutoff_level","addr_extension_virus","addr_extension_spam","addr_extension_banned","addr_extension_bad_header","warnvirusrecip","warnbannedrecip","warnbadhrecip","newvirus_admin","virus_admin","banned_admin","bad_header_admin","spam_admin","spam_subject_tag","spam_subject_tag2","message_size_limit","banned_rulenames","policyd_quota_in","policyd_quota_in_period","policyd_quota_out","policyd_quota_out_period","policyd_greylist","rspamd_greylisting","rspamd_spam_greylisting_level","rspamd_spam_tag_level","rspamd_spam_tag_method","rspamd_spam_kill_level"
    "1","1","0","riud","riud","r","Non-paying","N","N","N","N","Y","Y","Y","N","Y",,,,,,,"3.00","7.00","10.00","0.00","0.00",,,,,"N","N","N",,,,,,,,"0",,"-1","24","-1","24","N","n","6.00","8.00","rewrite_subject","12.00"
    "2","1","0","riud","riud","r","Uncensored","Y","Y","Y","Y","N","N","N","N","N",NULL,NULL,NULL,NULL,NULL,NULL,"3.00","999.00","999.00",NULL,NULL,NULL,NULL,NULL,NULL,"N","N","N",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"-1","24","-1","24","N","n","999.00","999.00","rewrite_subject","999.00"
    "3","1","0","riud","riud","r","Wants all spam","N","Y","N","N","N","N","N","N","Y",NULL,NULL,NULL,NULL,NULL,NULL,"3.00","999.00","999.00",NULL,NULL,NULL,NULL,NULL,NULL,"N","N","N",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"-1","24","-1","24","N","n","999.00","999.00","rewrite_subject","999.00"
    "4","1","0","riud","riud","r","Wants viruses","Y","N","Y","Y","N","N","N","N","Y",NULL,NULL,NULL,NULL,NULL,NULL,"3.00","6.90","6.90",NULL,NULL,NULL,NULL,NULL,NULL,"N","N","N",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"-1","24","-1","24","N","y","4.00","6.00","rewrite_subject","10.00"
    "5","1","0","riud","riud","r","Normal","N","N","N","N","N","N","N","N","Y",,,,,,,"1.00","4.50","50.00","0.00","0.00",NULL,NULL,NULL,NULL,"N","N","N",NULL,NULL,NULL,NULL,NULL,,"***SPAM***",NULL,NULL,"-1","24","-1","24","N","y","4.00","6.00","rewrite_subject","10.00"
    "6","1","0","riud","riud","r","Trigger happy","N","N","N","N","N","N","N","N","Y",NULL,NULL,NULL,NULL,NULL,NULL,"3.00","5.00","5.00",NULL,NULL,NULL,NULL,NULL,NULL,"N","N","N",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"-1","24","-1","24","N","y","2.00","4.00","rewrite_subject","8.00"
    "7","1","0","riud","riud","r","Permissive","N","N","N","Y","N","N","N","N","Y",NULL,NULL,NULL,NULL,NULL,NULL,"3.00","10.00","20.00",NULL,NULL,NULL,NULL,NULL,NULL,"N","N","N",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"-1","24","-1","24","N","n","7.00","10.00","rewrite_subject","20.00"
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Just tested this, the data in the database is fine and adding new policies works fine as well. The issue you see is caused by the fact that you did not fill in the fields before changing the tab. So the real issue is that ISPConfig should show you a more meaningful error message plus set more default values where possible. I'll add an issue report for that.
     
    Bocki likes this.
  10. Bocki

    Bocki Member HowtoForge Supporter

    Thanks, good to know that nothing is broken!
     

Share This Page