Re: What File Types does Cyrus use?

2001-11-23 Thread Emiliano

Birger Toedtmann wrote:

 * Not on Debian, appearantly. It's a compiled executable here.

 Uh?  Are you really sure?

$ file /usr/sbin/cyrdeliver
/usr/sbin/cyrdeliver: setuid setgid ELF 32-bit MSB executable, SPARC,
version 1 (SYSV), dynamically linked (uses shared libs), stripped

 Which version of cyrus do you use?

1.5.19

Emile





Re: What File Types does Cyrus use?

2001-11-23 Thread Birger Toedtmann

Emiliano schrieb am Fri, Nov 23, 2001 at 09:30:04AM +0100:
* Birger Toedtmann wrote:
* 
*  * Not on Debian, appearantly. It's a compiled executable here.
* 
*  Uh?  Are you really sure?
* 
* $ file /usr/sbin/cyrdeliver
* /usr/sbin/cyrdeliver: setuid setgid ELF 32-bit MSB executable, SPARC,
* version 1 (SYSV), dynamically linked (uses shared libs), stripped

That is the deliver program.  What I referred to was the administration
utility cyradm.  Is there no cyradm in 1.5.x?  That's a pity...

*  Which version of cyrus do you use?
* 
* 1.5.19

- Birger



Re: What File Types does Cyrus use?

2001-11-23 Thread Emiliano

Birger Toedtmann wrote:

 *  * Not on Debian, appearantly. It's a compiled executable here.
 * 
 *  Uh?  Are you really sure?
 *
 * $ file /usr/sbin/cyrdeliver
 * /usr/sbin/cyrdeliver: setuid setgid ELF 32-bit MSB executable, SPARC,
 * version 1 (SYSV), dynamically linked (uses shared libs), stripped

 That is the deliver program.  What I referred to was the administration
 utility cyradm.  Is there no cyradm in 1.5.x?  That's a pity...

Sorry, it's just 9:50 here and the coffee machine is broken. Here's what
I meant:

$ file /usr/bin/cyradm
/usr/bin/cyradm: ELF 32-bit MSB executable, SPARC, version 1 (SYSV),
dynamically linked (uses shared libs), stripped

Emile





Re: What File Types does Cyrus use?

2001-11-23 Thread Birger Toedtmann

Emiliano schrieb am Fri, Nov 23, 2001 at 09:53:24AM +0100:
* Birger Toedtmann wrote:
* 
*  *  * Not on Debian, appearantly. It's a compiled executable here.
*  * 
*  *  Uh?  Are you really sure?
*  *
*  * $ file /usr/sbin/cyrdeliver
*  * /usr/sbin/cyrdeliver: setuid setgid ELF 32-bit MSB executable, SPARC,
*  * version 1 (SYSV), dynamically linked (uses shared libs), stripped
* 
*  That is the deliver program.  What I referred to was the administration
*  utility cyradm.  Is there no cyradm in 1.5.x?  That's a pity...
* 
* Sorry, it's just 9:50 here and the coffee machine is broken. Here's what
* I meant:
* 
* $ file /usr/bin/cyradm
* /usr/bin/cyradm: ELF 32-bit MSB executable, SPARC, version 1 (SYSV),
* dynamically linked (uses shared libs), stripped
[...]

Mmmh, then there is no help on that side, indeed.  Well, I don't know whether
there is any Perl stuff included in 1.5.x - if not, I would recommend taking
that from 2.0.x.  Maybe you don't have to upgrade the server but can use the
Perl modules and admin script distributed with it for 1.5.x servers as well?


My suggestions end here I think,

- Birger



Re: What File Types does Cyrus use?

2001-11-23 Thread Jan Grant

On Fri, 23 Nov 2001, Birger Toedtmann wrote:

 Emiliano schrieb am Fri, Nov 23, 2001 at 09:53:24AM +0100:
 * Birger Toedtmann wrote:
 *
 *  *  * Not on Debian, appearantly. It's a compiled executable here.
 *  * 
 *  *  Uh?  Are you really sure?
 *  *
 *  * $ file /usr/sbin/cyrdeliver
 *  * /usr/sbin/cyrdeliver: setuid setgid ELF 32-bit MSB executable, SPARC,
 *  * version 1 (SYSV), dynamically linked (uses shared libs), stripped
 * 
 *  That is the deliver program.  What I referred to was the administration
 *  utility cyradm.  Is there no cyradm in 1.5.x?  That's a pity...
 *
 * Sorry, it's just 9:50 here and the coffee machine is broken. Here's what
 * I meant:
 *
 * $ file /usr/bin/cyradm
 * /usr/bin/cyradm: ELF 32-bit MSB executable, SPARC, version 1 (SYSV),
 * dynamically linked (uses shared libs), stripped
 [...]

 Mmmh, then there is no help on that side, indeed.  Well, I don't know whether
 there is any Perl stuff included in 1.5.x

Unless I'm smoking something really strong, the 1.5.x cyradm was a
tcl-enabled thing.

- if not, I would recommend taking
 that from 2.0.x.  Maybe you don't have to upgrade the server but can use the
 Perl modules and admin script distributed with it for 1.5.x servers as well?


 My suggestions end here I think,

 - Birger



-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 [EMAIL PROTECTED]
Prolog in JavaScript: http://tribble.ilrt.bris.ac.uk/~cmjg/logic/prolog-latest




Re: What File Types does Cyrus use?

2001-11-23 Thread Emiliano

Jan Grant wrote:

  * $ file /usr/bin/cyradm
  * /usr/bin/cyradm: ELF 32-bit MSB executable, SPARC, version 1 (SYSV),
  * dynamically linked (uses shared libs), stripped
  [...]
 
  Mmmh, then there is no help on that side, indeed.  Well, I don't know whether
  there is any Perl stuff included in 1.5.x

 Unless I'm smoking something really strong, the 1.5.x cyradm was a
 tcl-enabled thing.

That was my understanding too.. my guess would be that cyradm is the tcl
shell with the cyrus extensions linked in statically.

Emile





Re: What File Types does Cyrus use?

2001-11-22 Thread Birger Toedtmann

Emiliano schrieb am Thu, Nov 22, 2001 at 08:30:54AM +0100:
* Devdas Bhagat wrote:
* 
*  Hmmm, cyrus is supposed to be a black box solution. This means that
*  access should only be through the IMAP/POP/KPOP interface and not
*  directly over the filesystem.
*  What cyrus does internally should not be the concern of the
*  administrator/user.
* 
*  This is good from both the developer and administrator point of view,
*  and prevents hardcoded solutions from being put in place.
*  Even if the internal format changes for some reason, it should not
*  affect your application, and the IMAP interface provides a standard API.
* 
*  I don't think I need to specify why using a standard published API is
*  good.
* 
* Agreed, but in this line of reasoning I'd love to see an API that
* doesn't require logging is (as you'd have to through IMAP/POP/KPOP). For
* migration, or ACL reporting, or whatever else you'd want to do as a
* priviliged user (like the way cyrdeliver works) without needing each
* users' password.
[...]

Who needs that?  You have the admin account which can do almost anything.
We administrate a very large userbase (100k users, increasing) via this 
admin account and IMAP4 utilising the very power of perl and supplied
modules

  Cyurs::IMAP::Admin, Mail::IMAPClient.

All administrative run as batch jobs and do not require any human inter-
ference unless no errors are reported.  I won't say it is fast but you

 a) did not have to hack anything and

 b) do not risk messing up internal structures of cyrus.


As for the initial question: Isn't the decription given in server-design
(distributed with 2.0.x as text and html file) hint enough for layout
of the files mentioned here?


Regards,
 
- Birger



Re: What File Types does Cyrus use?

2001-11-22 Thread Emiliano

Birger Toedtmann wrote:

 * priviliged user (like the way cyrdeliver works) without needing each
 * users' password.
 [...]

 Who needs that?  You have the admin account which can do almost anything.
 We administrate a very large userbase (100k users, increasing) via this
 admin account and IMAP4 utilising the very power of perl and supplied
 modules

   Cyurs::IMAP::Admin, Mail::IMAPClient.

 All administrative run as batch jobs and do not require any human inter-
 ference unless no errors are reported.  I won't say it is fast but you

I didn't know about Cyrus::IMAP::Admin. I'll look into it, but how would
it gain access to the server without logging in? Or does it login (using
IMAP?) with the admin account?

Emile





Re: What File Types does Cyrus use?

2001-11-22 Thread Birger Toedtmann

Emiliano schrieb am Thu, Nov 22, 2001 at 12:45:53PM +0100:
* Birger Toedtmann wrote:
* 
*  * priviliged user (like the way cyrdeliver works) without needing each
*  * users' password.
*  [...]
* 
*  Who needs that?  You have the admin account which can do almost anything.
*  We administrate a very large userbase (100k users, increasing) via this
*  admin account and IMAP4 utilising the very power of perl and supplied
*  modules
* 
*Cyurs::IMAP::Admin, Mail::IMAPClient.
* 
*  All administrative run as batch jobs and do not require any human inter-
*  ference unless no errors are reported.  I won't say it is fast but you
* 
* I didn't know about Cyrus::IMAP::Admin. I'll look into it, but how would
* it gain access to the server without logging in? Or does it login (using
* IMAP?) with the admin account?

Yes, it does exactly the latter one.  Don't you use cyradm?  It is just
a perl script utilising Cyrus::IMAP::Admin which comes with all cyrus distri-
butions.  cyradm itself does *NOT* directly write or read files within
the cyrus structure but itself logs into the IMAP server with the admin 
account.  So using cyradm or writing your own perl script is nearly the
same...


- Birger



Re: What File Types does Cyrus use?

2001-11-22 Thread Ken Murchison

Quoting Emiliano [EMAIL PROTECTED]:

 Devdas Bhagat wrote:
 
  Hmmm, cyrus is supposed to be a black box solution. This means that
  access should only be through the IMAP/POP/KPOP interface and not
  directly over the filesystem.
  What cyrus does internally should not be the concern of the
  administrator/user.
 
  This is good from both the developer and administrator point of view,
  and prevents hardcoded solutions from being put in place.
  Even if the internal format changes for some reason, it should not
  affect your application, and the IMAP interface provides a standard API.
 
  I don't think I need to specify why using a standard published API is
  good.
 
 Agreed, but in this line of reasoning I'd love to see an API that
 doesn't require logging is (as you'd have to through IMAP/POP/KPOP). For
 migration, or ACL reporting, or whatever else you'd want to do as a
 priviliged user (like the way cyrdeliver works) without needing each
 users' password.

You don't need each user's password, just the admin's.  A couple of the SASL
mechs (PLAIN, OTP, others?) allow for proxying as another user.  That's what the
-a and -u options to cyradm and imtest are for.  Check out RFC2595 for details
on proxying via PLAIN.

Ken
-- 
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp



Re: What File Types does Cyrus use?

2001-11-22 Thread Ken Murchison

Quoting Amos Gouaux [EMAIL PROTECTED]:

  On Thu, 22 Nov 2001 17:13:19 +1100,
  Jeremy Howard [EMAIL PROTECTED] (jh) writes:
 
 jh I'm sure we all understand the dangers of hacking at internal
 structures.
 jh There's also performance benefits associated with this. It's up to
 solution
 jh developers to decide whether that trade-off makes sense in their
 particular
 jh case, and would be based on benchmarking and analysis of the level of
 jh maintenance required if internal structures change.
 
 While I guess it's always possible, I'd be somewhat surprised if
 going through the protocol is really that much of a bottle neck.

Agreed.  Doing stuff in perl or any other scripting language might be slow, I'm
guessing that compiled code would be fast enough for most applications.

I'd also submit that playing with the cyrus.* files on a running system is just
asking for trouble.

FWIW, there is no documentation on the cyrus.* files other than the source code.
 I found this out while writing the SORT/THREAD code.

Ken
-- 
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp



Re: What File Types does Cyrus use?

2001-11-22 Thread Emiliano

Birger Toedtmann wrote:

 * I didn't know about Cyrus::IMAP::Admin. I'll look into it, but how would
 * it gain access to the server without logging in? Or does it login (using
 * IMAP?) with the admin account?

 Yes, it does exactly the latter one.  Don't you use cyradm?  It is just
 a perl script utilising Cyrus::IMAP::Admin which comes with all cyrus distri-
 butions.

Not on Debian, appearantly. It's a compiled executable here.

Emile





Re: What File Types does Cyrus use?

2001-11-22 Thread Birger Toedtmann

Emiliano schrieb am Thu, Nov 22, 2001 at 10:22:25PM +0100:
* Birger Toedtmann wrote:
* 
*  * I didn't know about Cyrus::IMAP::Admin. I'll look into it, but how would
*  * it gain access to the server without logging in? Or does it login (using
*  * IMAP?) with the admin account?
* 
*  Yes, it does exactly the latter one.  Don't you use cyradm?  It is just
*  a perl script utilising Cyrus::IMAP::Admin which comes with all cyrus distri-
*  butions.
* 
* Not on Debian, appearantly. It's a compiled executable here.

Uh?  Are you really sure?  Which version of cyrus do you use?  Cyrus' 
installation are not platform dependant and I have only seen the skript
versions so far..

Anyway, here is a (very tiny) example how to do some stuff on the
server.  It simply adds all users supplied by STDIN:

  #!/usr/bin/perl
  use Cyrus::IMAP::Admin;
  my $client = Cyrus::IMAP::Admin-new('localhost');
  $client-authenticate(-mechanism, login, -user, admin, -password, 
adminpw);
  while () {
  chop;
  $client-create(user.$_);
  }


Regards,

- Birger



Re: What File Types does Cyrus use?

2001-11-21 Thread Jeremy Howard

The .index, .cache, ... files are Berkeley DB files, I believe
(www.sleepycat.com). I'd also like to know more about what's stored where
and how, so that our webmail app can use them directly rather than going
through the IMAP server to speed things up.

- Original Message -
From: Ashley Breeden [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 1:11 PM
Subject: What File Types does Cyrus use?


 Hi All,

 I have been trying to find this answer out for days.  I am writting a perl
script for use with our Cyrus POP3/IMAP4 server and I need to interigate the
Cyrus.index. Cyrus.header, Cyrus.cache files.

 However I have no idea what type of files they are?  Does anyone know How
I can find out or what the will be.

 If I use file cyrus.header I get
 cyrus.header: data

 As you can see that doesn't give me a lot to work with.  Also if possible
does anyone have anything that explains how each file is layed out, by this
I mean what data is stored and for what.

 Thanks heaps!


 Ashley Breeden







Re: What File Types does Cyrus use?

2001-11-21 Thread Devdas Bhagat

On 22/11/01 13:39 +1100, Jeremy Howard wrote:
 The .index, .cache, ... files are Berkeley DB files, I believe
 (www.sleepycat.com). I'd also like to know more about what's stored where
 and how, so that our webmail app can use them directly rather than going
 through the IMAP server to speed things up.

Hmmm, cyrus is supposed to be a black box solution. This means that
access should only be through the IMAP/POP/KPOP interface and not
directly over the filesystem.
What cyrus does internally should not be the concern of the
administrator/user.

This is good from both the developer and administrator point of view,
and prevents hardcoded solutions from being put in place.
Even if the internal format changes for some reason, it should not
affect your application, and the IMAP interface provides a standard API.

I don't think I need to specify why using a standard published API is
good.

Devdas Bhagat



Re: What File Types does Cyrus use?

2001-11-21 Thread Jeremy Howard

Devdas Bhagat wrote:
 Hmmm, cyrus is supposed to be a black box solution. This means that
 access should only be through the IMAP/POP/KPOP interface and not
 directly over the filesystem.
 What cyrus does internally should not be the concern of the
 administrator/user.

I'm sure we all understand the dangers of hacking at internal structures.
There's also performance benefits associated with this. It's up to solution
developers to decide whether that trade-off makes sense in their particular
case, and would be based on benchmarking and analysis of the level of
maintenance required if internal structures change.

Obviously this voids the warranty ;-) so I'm not looking for support, but if
anyone can summarise the file structures I'd appreciate. Otherwise I'll just
work it out for myself by looking at the code, but that seems awfully
inefficient, and will mean I'm just more likely to muck something up...





Re: What File Types does Cyrus use?

2001-11-21 Thread Amos Gouaux

 On Thu, 22 Nov 2001 17:13:19 +1100,
 Jeremy Howard [EMAIL PROTECTED] (jh) writes:

jh I'm sure we all understand the dangers of hacking at internal structures.
jh There's also performance benefits associated with this. It's up to solution
jh developers to decide whether that trade-off makes sense in their particular
jh case, and would be based on benchmarking and analysis of the level of
jh maintenance required if internal structures change.

While I guess it's always possible, I'd be somewhat surprised if
going through the protocol is really that much of a bottle neck.

-- 
Amos