sieve-test : MySQL Unknown column 'disablesieve-test'

Discussion in 'General' started by TonyG, Jan 10, 2024.

  1. TonyG

    TonyG Active Member

    I'm overhauling email filtering rules. I've been testing with sieve-filter which has no issues. The sieve-filter command with options "-v -C -D" is ideal for testing without update. After verification of any script, just changing the options to "-e -W -C" causes it to perform updates and re-allocate mail items from a folder.
    I switched to sieve-test to get a deeper look. I want to see the values of variables, especially the matches from RegEx (yes, I'm double-slashing).
    But sieve-test queries always result in error :
    Error: sql(name@domain): User query failed: Unknown column 'disablesieve-test' in 'where clause'
    Given other similar column names in dbispconfig it seems that's the table that is missing this column.
    This is ISPConfig v3.2.2. I have no idea if this is a bug, an as-yet-unsupported feature, something that changed after the .2 release, or an un-configured or mis-configured detail. I'm putting it here for comment.

    For current testing I would be OK with not using the ISPConfig before/after sieve filters, but I don't know if they can be disabled for a one-shot command like this.
    I'm hoping to get more insight here into what query is being performed and why for this command, so that I can work with this in a more informed manner later.

    Thanks

    EDIT: I see the query in /etc/dovecot/dovecot-sql.conf
    This could be solved by simply adding the column:
    ALTER TABLE `mail_user` ADD `disablesieve-test` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n'
    and then ensure users being tested have the 'n' value.
    Would this be an acceptable temporary solution?
     
    Last edited: Jan 10, 2024
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Update your ISPConfig to apply all database updates.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    First, you should generally update ISPConfig as your system is quite old. Then you'll have to add that column if you want to use sieve tests, ISPConfig is not using this specific function, that's why we do not have a setting for it. But you should default it to 'y' and not 'n' if you want it to work by default.
     

Share This Page