perl script

Nic Bernstein nic at onlight.com
Wed Apr 16 09:59:32 EDT 2014


On 04/16/2014 06:35 AM, Sandra Regina de Souza wrote:
> Hello!
>
>    I'm trying to run a perl script which one do a subscribe
> into a user.test.spam mailbox, for example. The mailbox user.test is ok 
> (has been created first, and is in use). But I have to create another
> mailbox, for every user in cyrus imap,named for example "spam".
>    When I try to do a $err = $imap->subscribe("user.bob"), after
> $my $Err = $Imap->create("user.test.spam")
>   it does nothing.
>   My cyrus imap version is : v2.4.16.
>
>   How can I do a subscribe in perl script?
>
> Thanks in advance.
>
> sandra

Sandra,
Which library are you using for this?  You show us the method
$imap->subscribe, but we don't know what kind of object $imap is.

If you're using the Net::IMAP library, then you may say
$imap->subscribe("user.bob") once "the session is in the authenticated
or selected states" (as per the man page).

If you're using Cyrus::IMAP::Admin, there is no subscribe method.

The Mail::IMAPClient library has a subscribed method much like that in
Net::IMAP.

I'm sure if we know more about what tools you're using and what you're
doing with them, someone can help.
    -nic




-- 
Nic Bernstein                             nic at onlight.com
Onlight, Inc.                             www.onlight.com
219 N. Milwaukee St., Suite 2a            v. 414.272.4477
Milwaukee, Wisconsin  53202



More information about the Info-cyrus mailing list