Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - autologin

 
Thread Tools Search this Thread
Old 01-18-2007, 05:29 AM   #1
Default autologin


HI,

I want to use a perl script to add email folder, but the script I wrote
doesnt seem right.

Here is the code:

line 1: open(CYRADMIN, "| /usr/local/bin/cyradm --user testuser -s
testserver");
line 2: print CYRADMIN $password;
line 3: print CYRADMIN "\n";
line 4: close(CYRADMIN);

when I execute the above code, it shown me a "Password:" prompt waiting
for me to enter a password. But line 2 of the code is already written a
password to it. Can anyone tell me how to correct this error?


Thanks
S


Pet Farrari
  Reply With Quote
Old 01-18-2007, 10:08 AM   #2
Lars Haugseth
 
Posts: n/a
Default Re: autologin


* Pet Farrari <> wrote:
>
> HI,
>
> I want to use a perl script to add email folder, but the script I
> wrote doesnt seem right.
>
> Here is the code:
>
> line 1: open(CYRADMIN, "| /usr/local/bin/cyradm --user testuser -s
> testserver");
> line 2: print CYRADMIN $password;
> line 3: print CYRADMIN "\n";
> line 4: close(CYRADMIN);
>
> when I execute the above code, it shown me a "Password:" prompt
> waiting for me to enter a password. But line 2 of the code is already
> written a password to it. Can anyone tell me how to correct this error?


Use the Cyrus::IMAP::Admin module.

--
Lars Haugseth

"If anyone disagrees with anything I say, I am quite prepared not only to
retract it, but also to deny under oath that I ever said it." -Tom Lehrer
  Reply With Quote
Old 01-21-2007, 11:36 PM   #3
Pet Farrari
 
Posts: n/a
Default Re: autologin

Lars Haugseth wrote:
> * Pet Farrari <> wrote:
>> HI,
>>
>> I want to use a perl script to add email folder, but the script I
>> wrote doesnt seem right.
>>
>> Here is the code:
>>
>> line 1: open(CYRADMIN, "| /usr/local/bin/cyradm --user testuser -s
>> testserver");
>> line 2: print CYRADMIN $password;
>> line 3: print CYRADMIN "\n";
>> line 4: close(CYRADMIN);
>>
>> when I execute the above code, it shown me a "Password:" prompt
>> waiting for me to enter a password. But line 2 of the code is already
>> written a password to it. Can anyone tell me how to correct this error?

>
> Use the Cyrus::IMAP::Admin module.
>

This is a bad module and I have numerous issues when running this
module. The right one should be IMAP::Admin. The problem had been resolved.

Thanks
Sam


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump