[Bug 169796] New: possibility to use kcron on some folders rather than the present possiblities
dmoyne
daniel.moyne at neuf.fr
Mon Aug 25 16:17:54 BST 2008
http://bugs.kde.org/show_bug.cgi?id=169796
Summary: possibility to use kcron on some folders rather than the
present possiblities
Product: kmail
Version: 1.10.0
Platform: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: wishlist
Priority: NOR
Component: general
AssignedTo: kdepim-bugs at kde.org
ReportedBy: daniel.moyne at neuf.fr
Version: 1.10.0 (using 4.1.00 (KDE 4.1.0), Kubuntu packages)
Compiler: gcc
OS: Linux (x86_64) release 2.6.24-19-generic
Is it possible to have an interface with Kcron to handle content of some
folders expiration :
I have a case where I have 2 folders a "Spam" and "NonSpam" folders to train
bogofilters from time to time ; consequently I want the following action to be
done :
#!/bin/sh
dir_data=/media/USER1_data/dmoyne_data/Mail_data/KDE_Mail/.Bogofilter.directory
kmail=/usr/lib/kde4/bin/kmail
#a) we train bogofilter on Spam and NonSpam folders
echo "training on Spam mail"
bogofilter -sv -B $dir_data/Spam/cur
echo "training on non-Spam mail"
bogofilter -nv -B $dir_data/NonSpam/cur
#b) we clean Spam and NonSpam folders only if KMail is not running
if [ "$(pidof $kmail)" ]
then
echo "KMail is running : we do not delete files as this might be
troublesome";
else
echo "KMail is not running : we delete content of Spam and NonSpam folders";
find $dir_data/NonSpam/cur -iname \*.* -exec rm {} \;
find $dir_data/Spam/cur -iname \*.* -exec rm {} \;
fi
#c) we display some information on bogofilter data base
echo "message count :"
#bogoutil -w ~/.bogofilter .MSG_COUNT
echo "wordlist.db :"
#bogoutil -d ~/.bogofilter/wordlist.db
echo "finished"
The problem with this action is to make proper cleaning of files (this is the
reason I do not do the job when Kmail is running) ; even when KMail is off such
drastic cleaning may be problematic ; consequently if an interface between
KMail and Kcron could be managed my script could be run in a coherent manner
whatever the status of KMail : running or not.
Can something be done ; until such development be integrated rather than use an
rm command can I use a special Kmail command to do the same whatever the status
of KMail : running or not.
Regards.
--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list