pilerpurge: undefined symbol: p_exec_query

Issue #984 resolved
Thomas Helmrich created an issue

Hi,

when running

pilerpurge -d 

i get a

pilerpurge: symbol lookup error: pilerpurge: undefined symbol: p_exec_query

How could i fix that?

Thanks & best regards

Thomas

Comments (12)

  1. Thomas Helmrich reporter

    Ok, seems like pilerpurge is outdated (Release Notes… 🙂 )
    i assume that it is save to delete in

    /usr/local/bin/pilerpurge
    

    Maybe the Docs on mailpiler.org needs an update?
    Regarding pilerpurge.py
    This tool assumes that the config is in

    ```/ /etc/piler/

    Is this a new location? Because my configs are stored in 
    

    /usr/local/etc/piler/piler.conf

    Should the config moved to the /etc?
    
    Moving on with pilerpurge:
    
    When calling pilerpurge with 
    

    pilerpurge.py --config /usr/local/etc/piler/piler.conf ```

    it complains about a missing ‘queuedir’ in section ‘piler’ within the config.

    When check the piler.conf in the freshly runned build, its even missing there - i just recognized it in unit_tests/test.conf
    What should this config set to?

    Thanks in advance & best regards,
    Thomas

  2. Janos SUTO repo owner

    Yes, please add queuedir=/var/piler/store to piler.conf - provided that you store your emails in this directory.

  3. Thomas Helmrich reporter

    pilerconf outputs

    queuedir=/var/piler/store
    

    When running

    ./pilerpurge.py --config "/usr/local/etc/piler/piler.conf" -d
    

    there is no output.

  4. Thomas Helmrich reporter

    It seems like the query in pilerpurge does not respect retention_rule
    This is the executed query:

    SELECT piler_id, size FROM metadata WHERE deleted=0 AND retained < UNIX_TIMESTAMP(NOW()) AND id NOT IN (SELECT id FROM rcpt WHERE to IN (SELECT email FROM legal_hold)) AND id NOT IN (SELECT id FROM metadata WHERE from IN (SELECT email FROM legal_hold))```
    
  5. Thomas Helmrich reporter

    Even after a reindex -a it doesn´t want to list the mails, where i recenlty added a retention_rule of 14 days.

  6. Janos SUTO repo owner

    pilerpurge.py has nothing to do with retention rules. The rules are processed at archiving time. In other words you define the retention rules, and piler figures out how long you want to keep the message, and sets the retention column accordingly. Then pilerpurge.py selects all messages with a retention timestamp in the past.

  7. Thomas Helmrich reporter

    Thanks for that information.

    So it's not possible to change the retention afterwards?

  8. Janos SUTO repo owner

    Well, normally no. However, since it’s your archive, you may fix the retained column in the metadata table.

  9. Log in to comment