Re: cyradm script
On Tue, August 23, 2005 10:05, Patrice said: > hello, > > I try to make a script to automate creation of users with cyradm > but I haven't found the way to pass the password to cyradm automatically > > does somebody already did it ? > > Patrice cyradm only creates mailboxes, it doesn't manage accounts. The latter depends on the method your Cyrus imapd uses for authentication. But if you are talking about creation of mailboxes, you may have a look to cyrus-mbox: http://www.pollux.franken.de/hjb/mail-server/ This is another (Perl) script, I'm using to create/delete mailboxes using a configurable scheme of subfolders and quota. hjb :-? 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
[Fwd: Re: cyradm script]
Just to put in my two cents' worth : In case it could be of interest to anyone, here is the answer I sent directly to the requester (I know it's bad :-), but I could then write in French ! ) Roughly, as someone else stated, cyradm is just a wrapper (or something of the sort) around a Perl library. Creating users is really straightforward using that library. In the script below, the password is stored in $passwd, and the user to create is in $a There's more information about the various commands available using perldoc Cyrus::IMAP::Admin I haven't gone much further than that, but if anyone is interested, feel free to ask Pascal Mouret Original Message Subject: Re: cyradm script Date: Tue, 23 Aug 2005 11:27:13 +0200 From: Pascal Mouret <[EMAIL PROTECTED]> To: Patrice <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Bonjour, Une réponse off-list pour pouvoir parler français, c'est plus facile. Je ne sais pas si ça peut vous intéresser, mais j'ai fait ça en Perl (cyradm n'est qu'un wrapper autour de la librairie Perl associée). C'est très facile à faire : use Cyrus::IMAP::Admin; [...] # connexion a Cyrus [...] print "Connection a Cyrus pour la creation des boites\n"; $client = Cyrus::IMAP::Admin->new('localhost'); $client->authenticate(-mechanism => 'login', -user => 'root', -password => $passwd); print STDERR "Y'a eu une erreur : ", $client->error if $client->error; [...] print "Creation de la boite de messagerie $a ..."; $rc = $client->create("user.$a"); if($client->error) {die "\nY'a eu une erreur : ".$client->error."\n";} else {print " Ok\n";} Pour plus d'infos sur les commandes qu'on peut lancer : perldoc Cyrus::IMAP::Admin Si vous voulez plus d'infos, n'hésitez pas Cordialement Pascal Mouret Patrice wrote: hello, I try to make a script to automate creation of users with cyradm but I haven't found the way to pass the password to cyradm automatically does somebody already did it ? Patrice 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 -- Pascal Mouret DSII - Direction du Système d'Information et de l'Informatique Université de Provence - 3, place Victor Hugo - 13331 Marseille cedex 3 Tél: 04 91 10 64 02E-mail: [EMAIL PROTECTED] Fax: 04 91 08 35 00 ou[EMAIL PROTECTED] (Ligne d'assistance (interne) : 04 91 10 85 55 / 04 42 95 34 54) -- Pascal Mouret DSII - Direction du Système d'Information et de l'Informatique Université de Provence - 3, place Victor Hugo - 13331 Marseille cedex 3 Tél: 04 91 10 64 02E-mail: [EMAIL PROTECTED] Fax: 04 91 08 35 00 ou[EMAIL PROTECTED] (Ligne d'assistance (interne) : 04 91 10 85 55 / 04 42 95 34 54) 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: cyradm script
Em Terça 23 Agosto 2005 05:05, Patrice escreveu: > hello, > > I try to make a script to automate creation of users with cyradm > but I haven't found the way to pass the password to cyradm automatically > > does somebody already did it ? I use gssapi (kerberos) authentication and cyradm is in my ~/.muttrc to automatically list my mailboxes. So, it's sort of a script yes ;) 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: cyradm script
On Tue, 2005-08-23 at 12:04 +0200, Nikola Milutinovic wrote: > Patrice wrote: > > > hello, > > > > I try to make a script to automate creation of users with cyradm > > but I haven't found the way to pass the password to cyradm automatically > > > > does somebody already did it ? > > > Well, "cyradm" is just a shell script wrapper over Perl Cyrus::Admin > module, if I'm not mistaken. So, anyone with solid knowledge of Perl can > write a Perl script to do anything you want. Not being a Perl user, I > can only directo you to Google for your solution, look for Perl scripts > to accomplish this. Or you can just use python imaplib module, it has support for every function out of the box. Ondrej. -- Ondrej Sury <[EMAIL PROTECTED]> signature.asc Description: This is a digitally signed message part 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: cyradm script
> hello, > > I try to make a script to automate creation of users with cyradm > but I haven't found the way to pass the password to cyradm automatically > > does somebody already did it ? This is how I do it: cyradm --user cyrus --auth login --pass [pass] localhost Simon > > Patrice > > > 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: cyradm script
Patrice wrote: hello, I try to make a script to automate creation of users with cyradm but I haven't found the way to pass the password to cyradm automatically does somebody already did it ? Well, "cyradm" is just a shell script wrapper over Perl Cyrus::Admin module, if I'm not mistaken. So, anyone with solid knowledge of Perl can write a Perl script to do anything you want. Not being a Perl user, I can only directo you to Google for your solution, look for Perl scripts to accomplish this. Nix. 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
cyradm script
hello, I try to make a script to automate creation of users with cyradm but I haven't found the way to pass the password to cyradm automatically does somebody already did it ? Patrice 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