Re: SQUATTER script and non English folders

2005-10-27 Thread David Carter

On Thu, 27 Oct 2005, [EMAIL PROTECTED] wrote:


1) I'm running the following script as a cronjob every night:
#!/bin/bash
su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"

But, it creates cyrus.squat file only in subfolders of the users INBOX, 
i.e. /var/spool/imap/user/username/ doesn't include cyrus.squat but 
/var/spool/imap/user/username/Drafts/ does include cyrus.squat after 
running the above script.


Looking at the code, that will generate squat indexes for all mailboxes 
matching user/*/*, which will match user/dpc22/foo, but not user/dpc22.


I suggest that you try: "/usr/lib/cyrus/bin/squatter -r user" or just
"/usr/lib/cyrus/bin/squatter".

2) When I create Hebrew named folders via OE or web client, it's look 
like this in the FS : &BdcF0wXpBdUF6g- but if I want to cd to this 
folder I get an error:

# cd &BdcF0wXpBdUF6g-
[1] 14268
-bash: BdcF0wXpBdUF6g-: command not found
[1]+  Donecd


That's two commands: cd run as a background task without any arguments, 
followed by "BdcF0wXpBdUF6g-", which isn't a valid command on your system.


You need to quote the & character. Something like:
  cd "&BdcF0wXpBdUF6g-" or
  cd \&BdcF0wXpBdUF6g-

--
David Carter Email: [EMAIL PROTECTED]
University Computing Service,Phone: (01223) 334502
New Museums Site, Pembroke Street,   Fax:   (01223) 334679
Cambridge UK. CB2 3QH.

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: SQUATTER script and non English folders

2005-10-27 Thread Ken Murchison

[EMAIL PROTECTED] wrote:

Hello All,
 
I have 2 questions:
 
1) I'm running the following script as a cronjob every night:

#!/bin/bash
su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"


Why not run this from cyrus.conf as an EVENT?  There is no good reason 
that I can think of to not keep all Cyrus related stuff in cyrus.conf.



But, it creates cyrus.squat file only in subfolders of the users INBOX, 
i.e. /var/spool/imap/user/username/ doesn't include cyrus.squat but 
/var/spool/imap/user/username/Drafts/ does include cyrus.squat after 
running the above script.
 
What's wrong with my syntax?


I believe David's assessment is correct.

--
Kenneth Murchison
Systems Programmer
Carnegie Mellon University

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


RE: SQUATTER script and non English folders

2005-10-27 Thread lkolchin
Thanks Ken,

But should it be "squatter -r user" or full path
"/usr/lib/cyrus/bin/squatter -r user"?

Regards,
Leon Kolchinsky

-Original Message-
From: Ken Murchison [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 27, 2005 4:29 PM
To: לאון קולצ'ינסקי
Cc: info-cyrus@lists.andrew.cmu.edu
Subject: Re: SQUATTER script and non English folders

[EMAIL PROTECTED] wrote:
> OK, Thanks
> 
> Could you tell me please how to run SQUATTER as an EVENT from cyrus.conf?
> How the configuration should look like?

Add something like the following to the EVENTS section of cyrus.conf:

squat   cmd="squatter -r user" at=0300


This will run the given command at 3am every day.


> 
> -Original Message-
> From: Ken Murchison [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 27, 2005 4:07 PM
> To: לאון קולצ'ינסקי
> Cc: info-cyrus@lists.andrew.cmu.edu
> Subject: Re: SQUATTER script and non English folders
> 
> [EMAIL PROTECTED] wrote:
>> Hello All,
>>  
>> I have 2 questions:
>>  
>> 1) I'm running the following script as a cronjob every night:
>> #!/bin/bash
>> su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"
> 
> Why not run this from cyrus.conf as an EVENT?  There is no good reason that I 
> can think of to not keep all Cyrus related stuff in cyrus.conf.
> 
> 
>> But, it creates cyrus.squat file only in subfolders of the users 
>> INBOX, i.e. /var/spool/imap/user/username/ doesn't include 
>> cyrus.squat but /var/spool/imap/user/username/Drafts/ does include 
>> cyrus.squat after running the above script.
>>  
>> What's wrong with my syntax?
> 
> I believe David's assessment is correct.
> 


--
Kenneth Murchison
Systems Programmer
Carnegie Mellon University

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


RE: SQUATTER script and non English folders

2005-10-27 Thread lkolchin
OK, Thanks

Could you tell me please how to run SQUATTER as an EVENT from cyrus.conf?
How the configuration should look like?

P.S.:
I'm using SLES9

Best Regards,
Leon Kolchinsky 

-Original Message-
From: Ken Murchison [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 27, 2005 4:07 PM
To: לאון קולצ'ינסקי
Cc: info-cyrus@lists.andrew.cmu.edu
Subject: Re: SQUATTER script and non English folders

[EMAIL PROTECTED] wrote:
> Hello All,
>  
> I have 2 questions:
>  
> 1) I'm running the following script as a cronjob every night:
> #!/bin/bash
> su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"

Why not run this from cyrus.conf as an EVENT?  There is no good reason that I 
can think of to not keep all Cyrus related stuff in cyrus.conf.


> But, it creates cyrus.squat file only in subfolders of the users INBOX, 
> i.e. /var/spool/imap/user/username/ doesn't include cyrus.squat but 
> /var/spool/imap/user/username/Drafts/ does include cyrus.squat after 
> running the above script.
>  
> What's wrong with my syntax?

I believe David's assessment is correct.

-- 
Kenneth Murchison
Systems Programmer
Carnegie Mellon University

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: SQUATTER script and non English folders

2005-10-27 Thread Ken Murchison

[EMAIL PROTECTED] wrote:

OK, Thanks

Could you tell me please how to run SQUATTER as an EVENT from cyrus.conf?
How the configuration should look like?


Add something like the following to the EVENTS section of cyrus.conf:

squat   cmd="squatter -r user" at=0300


This will run the given command at 3am every day.




-Original Message-
From: Ken Murchison [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 27, 2005 4:07 PM

To: לאון קולצ'ינסקי
Cc: info-cyrus@lists.andrew.cmu.edu
Subject: Re: SQUATTER script and non English folders

[EMAIL PROTECTED] wrote:

Hello All,
 
I have 2 questions:
 
1) I'm running the following script as a cronjob every night:

#!/bin/bash
su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"


Why not run this from cyrus.conf as an EVENT?  There is no good reason that I 
can think of to not keep all Cyrus related stuff in cyrus.conf.


But, it creates cyrus.squat file only in subfolders of the users INBOX, 
i.e. /var/spool/imap/user/username/ doesn't include cyrus.squat but 
/var/spool/imap/user/username/Drafts/ does include cyrus.squat after 
running the above script.
 
What's wrong with my syntax?


I believe David's assessment is correct.




--
Kenneth Murchison
Systems Programmer
Carnegie Mellon University

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: SQUATTER script and non English folders

2005-10-27 Thread info-cyrus

-- David Carter said the following on 10/27/05 8:53 AM:

On Thu, 27 Oct 2005, [EMAIL PROTECTED] wrote:


1) I'm running the following script as a cronjob every night:
#!/bin/bash
su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"

But, it creates cyrus.squat file only in subfolders of the users 
INBOX, i.e. /var/spool/imap/user/username/ doesn't include cyrus.squat 
but /var/spool/imap/user/username/Drafts/ does include cyrus.squat 
after running the above script.


Looking at the code, that will generate squat indexes for all mailboxes 
matching user/*/*, which will match user/dpc22/foo, but not user/dpc22.


I suggest that you try: "/usr/lib/cyrus/bin/squatter -r user" or just
"/usr/lib/cyrus/bin/squatter".


Since you've looked at the code, what about:

 squatter -r 'user.a*'

What I'd like to be able to do is to squat on one letter of the alphabet 
at a time, cycling through the letters maybe once a month. Obviously not 
all messages will be squatted on, but I'm worried that if I try to squat 
the entire server every night, the I/O from that combined with backups 
will mean that the squatting never finishes in time for active business 
hours. So I was thinking that a compromise would be to keep most of the 
messages squatted by cycling through what mailboxes I squat..


(Can you imagine someone reading this out-of-context? ;-)

Amos


Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


RE: SQUATTER script and non English folders

2005-10-27 Thread lkolchin
Hi,

/usr/lib/cyrus/bin/squatter -r user

works fine for me, but the idea of one letter  of the alphabet at a time is 
nice.

Interesting, when I use webinterface (IMP or Squirremail) after I've finished 
to run squatter I got this message:
imap[15835]: SQUAT returned 45 messages

But after a while, when I got new messages in this account, I've got this 
message:
imap[16924]: SQUAT returned 46 messages

Does it mean that cyrus.squat file has been updated automatically, even before 
I've run "squatter -r user" again?
If so, why should I run "squatter -r user" on regular basis?

Best Regards,
Leon Kolchinsky

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, October 27, 2005 7:17 PM
To: info-cyrus@lists.andrew.cmu.edu
Subject: Re: SQUATTER script and non English folders

-- David Carter said the following on 10/27/05 8:53 AM:
> On Thu, 27 Oct 2005, [EMAIL PROTECTED] wrote:
> 
>> 1) I'm running the following script as a cronjob every night:
>> #!/bin/bash
>> su - cyrus -c "/usr/lib/cyrus/bin/squatter -r user/*"
>>
>> But, it creates cyrus.squat file only in subfolders of the users 
>> INBOX, i.e. /var/spool/imap/user/username/ doesn't include 
>> cyrus.squat but /var/spool/imap/user/username/Drafts/ does include 
>> cyrus.squat after running the above script.
> 
> Looking at the code, that will generate squat indexes for all 
> mailboxes matching user/*/*, which will match user/dpc22/foo, but not 
> user/dpc22.
> 
> I suggest that you try: "/usr/lib/cyrus/bin/squatter -r user" or just 
> "/usr/lib/cyrus/bin/squatter".

Since you've looked at the code, what about:

  squatter -r 'user.a*'

What I'd like to be able to do is to squat on one letter of the alphabet at a 
time, cycling through the letters maybe once a month. Obviously not all 
messages will be squatted on, but I'm worried that if I try to squat the entire 
server every night, the I/O from that combined with backups will mean that the 
squatting never finishes in time for active business hours. So I was thinking 
that a compromise would be to keep most of the messages squatted by cycling 
through what mailboxes I squat..

(Can you imagine someone reading this out-of-context? ;-)

Amos


Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: 
http://cyruswiki.andrew.cmu.edu List Archives/Info: 
http://asg.web.cmu.edu/cyrus/mailing-list.html

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: SQUATTER script and non English folders

2005-10-28 Thread David Carter

On Thu, 27 Oct 2005, [EMAIL PROTECTED] wrote:


Since you've looked at the code, what about: squatter -r 'user.a*'


That will look for mailboxes matching user.a*.* which would match 
"user.abc123.foo2 but not "user.abc123".


The code just adds ".*" to the end of any string that you give it, hence 
the slightly odd wording in the manual page:


 -r: Recursively create indexes for all submailboxes of the mailboxes
 or mailbox prefixes given as arguments.

I'm worried that if I try to squat the entire server every night, the 
I/O from that combined with backups will mean that the squatting never 
finishes in time for active business hours.


I had the same concern. I made a small change to my Cyrus install so that 
it only squats a fraction of the mailboxes each night using some simple 
modulo arithmetic (e.g: squatter -m0 -M5 squats 1/5th of the mailboxes).


--
David Carter Email: [EMAIL PROTECTED]
University Computing Service,Phone: (01223) 334502
New Museums Site, Pembroke Street,   Fax:   (01223) 334679
Cambridge UK. CB2 3QH.

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


RE: SQUATTER script and non English folders

2005-10-28 Thread David Carter

On Fri, 28 Oct 2005, [EMAIL PROTECTED] wrote:


Interesting, when I use webinterface (IMP or Squirremail) after I've finished 
to run squatter I got this message:
imap[15835]: SQUAT returned 45 messages

But after a while, when I got new messages in this account, I've got 
this message: imap[16924]: SQUAT returned 46 messages


squat is just a first approximation to narrow down the search. After imapd 
gets a list of messages from squat it has to search the messages to find 
out which ones are genuine matches. Any messages appearing after the squat 
index was generated are automatically included as potential matches:


imap/search_engines.c:

  /* Add in any unindexed messages. They must be searched manually. */
  for (i = 0; i < vlen; i++) {
msg_vector[i] |= unindexed_vector[i];
  }

Does it mean that cyrus.squat file has been updated automatically, even 
before I've run "squatter -r user" again? If so, why should I run 
"squatter -r user" on regular basis?


The squat indexes are just a snapshot of the state of a given mailbox. As 
that mailbox changes imapd will have to work harder to search messages not 
covered by the index.


--
David Carter Email: [EMAIL PROTECTED]
University Computing Service,Phone: (01223) 334502
New Museums Site, Pembroke Street,   Fax:   (01223) 334679
Cambridge UK. CB2 3QH.

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: SQUATTER script and non English folders

2005-10-29 Thread info-cyrus

-- David Carter said the following on 10/28/05 4:11 AM:

On Thu, 27 Oct 2005, [EMAIL PROTECTED] wrote:


Since you've looked at the code, what about: squatter -r 'user.a*'


That will look for mailboxes matching user.a*.* which would match 
"user.abc123.foo2 but not "user.abc123".


The code just adds ".*" to the end of any string that you give it, hence 
the slightly odd wording in the manual page:


 -r: Recursively create indexes for all submailboxes of the mailboxes
 or mailbox prefixes given as arguments.


That just seems so odd. I wonder why they did that? ipurge doesn't seem 
to do that


I had the same concern. I made a small change to my Cyrus install so 
that it only squats a fraction of the mailboxes each night using some 
simple modulo arithmetic (e.g: squatter -m0 -M5 squats 1/5th of the 
mailboxes).


Care to share? I'd love to be able to provide this indexing for folks so 
that they can experience faster searching, but there's no way we can run 
squatter on the entire server in one night. :-(


Amos


Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html