Thanks for the info Dave.  I did just what you described except I
pushed it to a text file so I could see better what was happening.

I ran it with the 5 day setting and didn't get anything. 
Then I dropped it to 2 days and got a list.  The script is apparently
working but only on about half of the domains.  I have other domains
that never made it into the output.txt file.  I know there is trash
there because I have one user with over 3000 messages.

I guess
now the question is, does the script just delete everything older than
DELTIME? or is it looking for something to only get messages?  I see
in the output that it looks like it's going to delete some index and
dovecot-uidlist files.  Is this ok?  What can I do to see why
it's not finding all of the old messages?.




> 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:[email protected]] Sent: Wednesday,
>>> September 09, 2009 8:39 PM
>>> To:
[email protected]
>>> 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:
> [email protected]
>
     For additional commands, e-mail:
>
[email protected]
> 
> 
>

Reply via email to