Hi Phil,
The line you are looking at
PATH_TRASH="`find /home/vpopmail/domains -type d -name .Trash`" is not
the problem. By default "find" will start looking in the path for
files/directories and is recursive. So it is starting in
/home/vpopmail/domains looking for any directories (-type d) named
.Trash. So it will find any .Trash directories living under
/home/vpopmail/domains.

Looking at /opt/qmailtoaster-plus/etc/cron.hourly/qtp-clean-trash the
real processing is done in the nested if statements. The script is
written so that all output of the rm command is sent to /dev/null. So
you will never see what it is doing.

Just to test the script, I copied it to a new file called "myscript" and
changed the following. Look for this line:
rm -f ${file}  >/dev/null 2>&1
change it to this
ls  ${file}

then run myscript (make sure the script is executable)

it should list all the files it would delete if the original script was run.

If it returns nothing, then you have no files older than the default 5
days in any .Trash directory under /home/vpopmail/domains. I think I
would then change the line
DELTIME=5
to
DELTIME=1
in myscript and try it again.

Post back if it listed any files.

Dave



Eric Shubert wrote:
> That might be as a result of not having everything under INBOX with
> dovecot. I'll try to have a look at it tomorrow.
>
> Phil Leinhauser wrote:
>> OK, I found the qtp-clean-trash script and ran that.  Qtprune is the
>> grandfather but basically the same.  They are both looking in .Trash
>> for the
>> old messages.  My system has them in .Trash/cur.  It's not finding
>> the old
>> ones.  It only runs for a second or 2.  I expect it to run a few
>> minutes at
>> least.  I have a bunch of trash!
>>
>> -----Original Message-----
>> From: Jake Vickers [mailto:j...@qmailtoaster.com] Sent: Wednesday,
>> September 09, 2009 8:39 PM
>> To: qmailtoaster-list@qmailtoaster.com
>> Subject: Re: [qmailtoaster] qtprune
>>
>> Phil Leinhauser wrote:
>>> I just decided to start running qtprune.  It's the first time I've
>>> run it.
>>> I'll cron it once I'm happy with the results.  What I see in the
>>> script is
>>> that it seems to be looking in the .Trash folder.  The problem is
>>> that the
>>> trashed messages are actually in the .Trash/cur folder.  Therefore,
>> qtprune
>>> doesn't find them.  In fact, all of my folders are in the
>>> .something/cur
>>> folder. 
>>> 2 questions:
>>> 1- Is this because of dovecot?  I don't ever remember the folder
>>> structure
>>> before dovecot.
>>> 2- How can I change the script to get them? PATH_TRASH="`find
>>> /home/vpopmail/domains -type d -name .Trash`" is the
>> line
>>> in the script and I tried to change it to .Trash/cur but I got an
>>> error:
>>>
>>> find: warning: Unix filenames usually don't contain slashes (though
>>> pathnames do).  That means that '-name .Trash/cur' will probably
>>> evaluate
>> to
>>> false all the time on this system.  You might find the '-wholename'
>>> test
>>> more useful, or perhaps '-samefile'.  Alternatively, if you are
>>> using GNU
>>> grep, you could use 'find ... -print0 | grep -FzZ .Trash/cur'.
>>>
>>> So, any ideas?  I'm not a linux scripter...
>>>   
>>
>> qtprune? Or the qtp-clean-trash script in Qmailtoaster-Plus?
>> The one in QTP works. I just tested it.
>> It can be installed by the qtp-menu and it runs as an hourly cron
>> job. It (by default) deletes messages older than 5 days, but this ca
>> be changed by changing the value in the
>> /etc/cron.hourly/qtp-clean-trash script (or by creating a file called
>> /var/qmail/control/deltrash and putting the number of days in the file).
>>
>>
>
>

---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
    Vickers Consulting Group offers Qmailtoaster support and installations.
      If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
     Please visit qmailtoaster.com for the latest news, updates, and packages.
     
      To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
     For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com


Reply via email to