purge or delete messages

Questions and answers about how to do stuff
Post Reply
mattch
Posts: 15
Joined: 28 Mar 2018 22:26

purge or delete messages

Post by mattch » 17 Feb 2019 17:01

i hope this is the right place to ask. any pointer or suggestion much appreciated!

how can i remove messages in quarantine, mass delete all of them? a folder?

#i try to set in /var/www/html/mailscanner/conf.php

Code: Select all

define('QUARANTINE_DAYS_TO_KEEP', 0);
#and force it by

Code: Select all

/usr/local/bin/mailwatch/tools/Cron_jobs/mailwatch_quarantine_maint.php --clean
but i dont think this is correct method and didnt work for me anyway.


i have 7000 messages hanging around on mailwatch that makes my ocd kick in high gear:
Cron <clam@ > [ -x /usr/bin/clamav-unofficial-sigs.sh ] && /bin/bash /usr/bin/clamav-unofficial-sigs.sh > /dev/null

doing this stopped the messages but now i want to clean them up
yararulesproject_enabled="no"
enable_yararules="no"
sudo rm /var/lib/clamav/*yar
sudo rm /var/lib/clamav/*yara
sudo service clamd start

thank you!

henk
Posts: 360
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: purge or delete messages

Post by henk » 17 Feb 2019 23:35

This is the right place to ask questions :D
You mention "7000 messages hanging around on mailwatch that makes my ocd kick in high gear".

I you wake up and your house is on fire, that should kick you in high gear, not having a some mail ;)
To manage the number of mail entries, you have 2 options. (Your assumed MailScanner version: 5.0.7)
/var/www/html/mailscanner/conf.php

Code: Select all

// Define how many days of emails to keep.
define('RECORD_DAYS_TO_KEEP', 60); 

/* Quarantine settings */
// The quarantine flag is available from MailScanner 4.43.        
// It will drammatically improved the speed of quarantine operations
// but requires that you use the quarantine_maint.php in place of
// the clean.quarantine script provided with MailScanner.
define('QUARANTINE_USE_FLAG', true);
define('QUARANTINE_DAYS_TO_KEEP', 30);
next in /etc/MailScanner/defaults

Code: Select all

## Cron Job Actions
# MailScanner cron jobs are executed like this:
# hourly items: /usr/sbin/ms-cron HOURLY
# daily items:  /usr/sbin/ms-cron DAILY
# daemon check: /usr/sbin/ms-cron CHECK
# maintenance:  /usr/sbin/ms-cron MAINT
# This sets how many days files will remain in the "quarantine" area before
# being automatically removed. Set to 0 (zero) to disable.
# This is executed during the MAINT cron option.
#
q_days=30

mattch
Posts: 15
Joined: 28 Mar 2018 22:26

Re: purge or delete messages

Post by mattch » 18 Feb 2019 04:31

henk wrote:
17 Feb 2019 23:35
I you wake up and your house is on fire, that should kick you in high gear, not having a some mail ;)
:lol: :doh: :pray:
:angry-extinguishflame: :angry-screaming: :banana-skier:


thanks!

Post Reply