Error when using the GUi Delete

Issue #600 resolved
Micky Arter created an issue

Hi,

I have upgraded to the latest master branch (1.201-master build 919) , This was initialy deployed from the OVA and have enabled the GUI Delete function recently implemented ( to clear out junk mail that have got into the server before we setup archiving rules). However I have found that this is not working. I select some mail and select remove. I have then run a pilerpurge -d and nothing is displayed. I have checked the mail.log and the following appears, I have removed our domain name and replaced it with <removed>

" 2015/09/09 13:36:00 [error] 2298#0: *266 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.50.46, server: scan002.candlelight.co.uk, request: "POST /bulkremove.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "http://scan002.<removed>", referrer: "http://scan002.<Remove>/search.php" "

Thanks

Micky

Comments (11)

  1. Janos SUTO repo owner

    Check the retained column for the messages you wanted to delete, and verify that it has a value in the past. Also check the health page if you have message purging enabled, and finally check the maillog, right after running pilerpurge -d. The above error message is web server log, not mail log.

  2. Micky Arter reporter

    Checked the retailed column and have got messages with a value in the past. Purge is enabled in the health column Exert from mail log after pillerpurge -d " Sep 10 10:12:26 scan002 pilerpurge[17944]: unknown key: "session_timeout" Sep 10 10:12:26 scan002 pilerpurge[17944]: 4000000055f14984022d59a4000acc9d0bcf: mysql_stmt_prepare() error: Table 'piler.legal_hold' doesn't exist => sql: SELECT id, piler_id, size FROM metadata WHERE deleted=0 AND retained < 1441876346 AND attachments=0 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)) Sep 10 10:12:26 scan002 pilerpurge[17944]: 4000000055f14984022d59a4000acc9d0bcf: mysql_stmt_prepare() error: Table 'piler.legal_hold' doesn't exist => sql: SELECT id, piler_id, size FROM metadata WHERE deleted=0 AND retained < 1441876346 AND attachments > 0 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)) "

    Looks like I am missing a table called legal_hold.

    Below is the show table from the piler database

    | Tables_in_piler | +-------------------+ | archiving_rule | | attachment | | audit | | autosearch | | counter | | counter_stats | | customer_settings | | domain | | domain_user | | email | | email_groups | | folder | | folder_extra | | folder_message | | folder_user | | google | | google_imap | | group | | group_email | | group_user | | import | | ldap | | metadata | | note | | online | | option | | rcpt | | remote | | retention_rule | | search | | sph_counter | | sph_index | | tag | | user | | user_settings | | v_attachment | | v_messages | +-------------------+

    Thanks

    Micky

  3. Janos SUTO repo owner

    Please check the sql db schema upgrade script, util/db-upgrade-1.1.0-1.2.0.sql, and adjust your tables.

  4. Micky Arter reporter

    Tables Have now been adjusted and there error in the mail log have now gone.

    unless I have miss understoot how pilerpurge works it still appears not to be working log entry after running pilerpurge -d " Sep 16 10:26:03 scan002 pilerpurge[3302]: purged 0 messages, 31590 bytes " Below shows a mail I manually set the retailed time for to ensure their was +----+--------------------------------------+----------+-------+ | id | piler_id | retained | size | +----+--------------------------------------+----------+-------+ | 98 | 400000005571774f0ce3df9400adf106c06f | 1111 | 31590 | +----+--------------------------------------+----------+-------+ "

    I an also seeing this error still when trying to remove a mail though the GUI in the piler.yourdomain.com-error.log straight after I click remove.

    " 2015/09/16 09:54:59 [error] 2274#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.50.46, server: scan002, request: "POST /bulkremove.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "scan002", referrer: "http://scan002/search.php" "

    thanks

    Micky

  5. Micky Arter reporter

    apologies thought I had already posed a response to this. I think their are two issues here. Pilerpurge not purging and the GUI not not processing email set to be deleted.

    1 Pilerpurge . I have tested with setting the retained value and still the same result and the following in the log

    "Sep 25 11:10:11 scan002 pilerpurge[18153]: purged 0 messages, 31590 bytes"

    Below show there is a record to purge

    • SELECT id, piler_id, retained,size FROM metadata WHERE retained < 1442405013 AND deleted = 0
    • -> ;
      • +----+---------------------------------------------------------+----------------+---------+
    • | id | piler_id | retained | size |
    • +----+--------------------------------------------------------------+-----------+---------+
    • | 98 | 400000005571774f0ce3df9400adf106c06f | 144230663 | 31590 |
    • +----+------------------------------------------------------------+-------------+---------+
    • 1 row in set (0.04 sec)

    2, I also still get this error if I try to use the remove in the GUI in the piler error log as below

    "2015/09/25 11:28:10 [error] 2273#0: *4388 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.50.46, server: scan002.candlelight.co.uk, request: "POST /bulkremove.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "scan002.candlelight.co.uk", referrer: "http://scan002.candlelight.co.uk/search.php" "

    the is a screen shot of what I selected to delete

    delete.jpg

    and below shows the database entries for these emails

    • +---------+-----------------------------------+-------+---------+-----------------+
    • | id | fromdomain | size | deleted | retained |
    • +---------+-----------------------------------+-------+---------+-----------------+
    • | 74416 | tfminsights.ubm-info.com | 16115 | 0 | 1867654312 |
    • | 74596 | tfminsights.ubm-info.com | 16149 | 0 | 1867656094 |
    • | 182012 | tfminsights.ubm-info.com | 28088 | 0 | 1848850986 |
    • | 182833 | tfminsights.ubm-info.com | 13982 | 0 | 1855072101 |
    • | 215397 | tfminsights.ubm-info.com | 14469 | 0 | 1870683586 |
    • | 215504 | tfminsights.ubm-info.com | 14507 | 0 | 1870685114 |
    • | 285606 | tfminsights.ubm-info.com | 13865 | 0 | 1873809668 |
    • | 285629 | tfminsights.ubm-info.com | 13905 | 0 | 1873810090 |
    • | 522441 | tfminsights.ubm-info.com | 12655 | 0 | 1874420729 |
    • | 523445 | tfminsights.ubm-info.com | 12695 | 0 | 1874421325 |
    • +--------+------------------------------------+---------+---------+----------------+ 10 rows in set (0.00 sec)

    thanks

    Micky

  6. Janos SUTO repo owner

    OK, then firstly check if you have the following rewrite rule in your webserver:

    /bulkremove.php => /index.php?route=message/bulkremove

  7. Micky Arter reporter

    That has fixed the issue. I now get a response from pilerpurge -d and have run a pilerpurge and can confirm that all mails selected have Been deleted as they should be

    Thanks

  8. Log in to comment