Forums

Aurelijus
Aurelijus
Offline
Resolved
0 votes
How can I as site admin clear out all the quarantined messages?

Out of curiosity I did set to quarantine everything - now I have more than 20000 msgs. It is a pain to do page by page - why there is no such option as site admin to clear all the quarantined messages? Or at least to provide a search based on score and then delete.

I did some search in sources - I see there is an option to make the 'delete all' button to show - but it looks that there is some query behind it and does nothing even if I make it visible.

Please, advise on this before I will go further and try to drop and re-create system-mysqld DB.

Aurelijus
In Mail
Monday, December 21 2009, 01:39 PM
Share this post:
Responses (11)
  • Accepted Answer

    Dusan
    Dusan
    Offline
    Saturday, February 19 2011, 04:49 PM - #Permalink
    Resolved
    0 votes
    In ClearOS 5.2, there is a script to purge spam.
    You can setup cron job to do this for you monthly.

    create cron job file:
    vi /etc/cron.d/quarantine-purge


    and insert:
    @monthly root /usr/sbin/quarantine-purge



    If you have a lot messages in quarantine be sure to increase MySQL innodb_buffer_pool_size, otherwise script will fail to complete it's job.

    vi /usr/share/system-mysql/etc/my.cnf


    add this [mysqld] section:
    innodb_buffer_pool_size = 83886080
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 11 2011, 08:04 PM - #Permalink
    Resolved
    0 votes
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 11 2011, 07:18 PM - #Permalink
    Resolved
    0 votes
    Thanks for the fix on the delete all button :-)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 11 2011, 07:18 PM - #Permalink
    Resolved
    0 votes
    me too, so where do we post it so they would see it as a feature request?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 08 2011, 11:10 AM - #Permalink
    Resolved
    0 votes
    P.S I like the idea of a quarantine system policy to purge it after an extended length of time
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 08 2011, 11:06 AM - #Permalink
    Resolved
    0 votes
    Ok here's a hack to enable a "Delete All" button to wipe your quarantine.

    This functionality is partially hidden in the Mailzu software, because by default Mailzu will only permit users to delete their own email, however most of the time "admin" or root users will be accessing the quarantine. I've hacked the code so that the button will wipe all user quarantined email. There is probably a better way but it works for me :)

    /var/webconfig/htdocs/mailzu/templates/quarantine.template.php line 61
    printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav'])) );
    TO
    printActionButtons(!CmnFns::didSearch());


    /var/webconfig/htdocs/mailzu/lib/Quarantine.lib.php line 233
    $res = $db->get_user_messages($content_type, $emailaddresses, 'msgs.time_num', 'DESC', '', false, 0, 0, true);
    TO
    $res = $db->get_user_messages($content_type, $emailaddresses, 'msgs.time_num', 'DESC', '', true, 0, 0, true);

    Enjoy :)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 04 2011, 07:18 PM - #Permalink
    Resolved
    0 votes
    Hey Everyone,

    Ok, the Mod listed that allows you to increase the amount of messages per page is GREAT, and I appreciate that.

    HOWEVER,

    there has to be a way to delete all of the messages or delete messages over a certain age.

    Does anyone know how to do this?

    If you turn off, and on the quarantine filter, does it automatically delete all of them? (thats a thought, but I doubt it does and havent tried it yet)

    What we REALLY need is a way to set a system policy ( so that your hard drive doesnt fill up over a year or two, just because you forgot to go and flush the thing ) that any message over x amount of months or days is automatically purged.

    As an IT Administrator, I really don't want to have to log in and purge the thing regularly. I really only want to go there when someone openes a helpdesk ticket who is trying to locate an email. If they wait more than one month, in my opinion, it is just too late.. and chances are they wouldn't be asking you about something sent a long time ago, but rather more recent.

    Has anyone written a script for this, OR can this be a feature request to ClearOS in moving forward?

    Thanks for any and all help.

    Sincerely,

    George
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, October 19 2010, 03:01 PM - #Permalink
    Resolved
    0 votes
    Thank you Gabriel for posting that. I had come across that before but I didn't need it at the time and when I did need it I couldn't find it again. I can confirm it is a little slow at deleting them but it gets the job done.

    Thanks again!
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, October 19 2010, 06:05 AM - #Permalink
    Resolved
    0 votes
    for increase messages on quarantine page edit
    /var/webconfig/htdocs/mailzu/config/config.php
    line 42
    $conf['app']['displaySizeLimit'] = 50; (i put 10000 but it is very slow on delete :) )
    The reply is currently minimized Show
  • Accepted Answer

    Aurelijus
    Aurelijus
    Offline
    Monday, October 18 2010, 11:48 AM - #Permalink
    Resolved
    0 votes
    No, the only thing I found was how to increase amount of messages per page. So I did that and still had to do page by page deletion of quarantined messages.

    Not sure if I would be able to tell where I did that.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, October 16 2010, 07:25 PM - #Permalink
    Resolved
    0 votes
    Did you ever find a way to do this?
    The reply is currently minimized Show
Your Reply