> On 30 Aug 2014, at 15:32 , RW <rwmailli...@googlemail.com> wrote:
> 
> On Sat, 30 Aug 2014 08:23:02 -0600
> LuKreme wrote:
> 
>>  if test -d "$J_PATH"; then
>>    MYFIND=`find $J_PATH/ -type f -mtime -7|grep -v dovecot`
> 
> mtime may not be the best choice. Ideally what you want is the the time
> since the spam was moved to Junk, rather than the time since it was
> delivered. What I see with dovecot when I move mail with claws mail is
> that  a new file is created with the mtime preserved at the
> delivery time and the current epoch time in the filename. In that case
> the ideal would be Btime if your OS supports it, or failing that
> ctime. 
> 
> You could also use the time in the filename. Note that epoch times are
> 10 digits until long after we're dead so simple lexicographical
> comparisons between maildir filenames or between a maildir filename and
> an epoch time will work.

On my system the file is not renamed when it is moved.

> You may want to check what happens with whatever you use to move the
> spam.

Spam is delivered to the junk box at delivery time, or is manually moved via 
IMAP by the user.

Is there a way to actually show the mtime and ctime of a file?

>>    if test -n "$MYFIND"; then
>>      /usr/local/bin/sa-learn --spam -u ${i} $MYFIND #>/dev/null 2>&1
> 
> This may run into shell argument limits if you have to learn a lot of
> spam. Consider piping the output of find to xargs, or using 
> -exec ...{} + in find.

Yes, I tried to do that, but as I said in my first post, if I do the find as 
part of the sa-learn command, then it stall when the find command returns null.


-- 
The fact that Bob and John are married does nothing to diminish anyone
else's marriage any more than a black woman marrying a white man, a Jew
marrying a Catholic, or an ugly Lyle marrying a Pretty Woman

Reply via email to