cyradm: perl: symbol lookup error?
Patrick Goetz
pgoetz at mail.utexas.edu
Sat Sep 19 05:54:43 EDT 2015
Just a quick note: IMAP::Admin appears to be broken, at the moment, and
can't be compiled. The Debian people submitted a patch 3 months ago
with no activity, indicating that the Perl module is semi-abandoned.
On 9/17/2015 3:03 PM, Patrick Boutilier wrote:
> On 09/17/2015 04:07 PM, Patrick Goetz wrote:
>> Thanks. I'm just now getting around to looking at this script. This
>> creates a mailbox, but don't you also need to set access privileges for
>> the user associated with this mailbox?
>
> Only if you are going to change the default rights. User will have
> access by default.
>
>
>
>
>
>>
>>
>>
>> On 09/16/2015 12:00 PM, Patrick Boutilier wrote:
>>>
>>> We use this simple perl script to add users. Fill in appropriate
>>> username and password.
>>>
>>>
>>>
>>>
>>>
>>> #!/usr/bin/perl -w
>>> #
>>> use File::Basename;
>>> use IMAP::Admin;
>>>
>>> if ( 0 == scalar( @ARGV ) ) {
>>> die( "\n Usuage: $0 userid\n");
>>> }
>>>
>>>
>>> $mailbox = "user.$ARGV[0]";
>>> $username = "";
>>> $password = "";
>>>
>>> # Set this to the hostname of your IMAP server
>>> $IMAPSERVER = "localhost";
>>> #
>>>
>>> # Main Code
>>> #
>>> # Login to IMAP server
>>> $imap = IMAP::Admin->new('Server' => $IMAPSERVER,
>>> 'Login' => $username,
>>> 'Password' => $password,) || die "no go $!
>>> !";
>>>
>>> print "Login: " . $imap->error . "\n";
>>>
>>> # Add user
>>> $add = $imap->create("$mailbox");
>>>
>>> if ($add != 0) {
>>> print "Error: " . $imap->error . "\n";
>>> }
>>> else {
>>> print "$ARGV[0] added.\n";
>>> }
>>>
>>>
>>> # Close connection
>>> $imap->close;
>>> exit;
>>>
>>>
>>> ----
>>> Cyrus Home Page: http://www.cyrusimap.org/
>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>
>> ----
>> Cyrus Home Page: http://www.cyrusimap.org/
>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:
>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>
>
>
>
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>
More information about the Info-cyrus
mailing list