Default Folders on account creation

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

kcsc
Posts: 62
Joined: Thu Oct 04, 2007 11:35 am
Location: US

Default Folders on account creation

Postby kcsc » Thu Oct 04, 2007 2:29 pm

How would one go about having default folders on Account Creation. For instance a "Possible Junk" or something of the like that all users should have at creation.

Hiob86
Posts: 92
Joined: Thu Sep 20, 2007 3:43 am
Contact:

Postby Hiob86 » Thu Oct 04, 2007 3:35 pm

i have the same problem.

kcsc
Posts: 62
Joined: Thu Oct 04, 2007 11:35 am
Location: US

Postby kcsc » Wed Oct 10, 2007 1:47 pm

I have wrote this script and it seems to work fine. If I have some time maybe I will dress it up some. There is no real error checking at the moment. Tell me if you see any problems.

folderCreate

Code: Select all

#!/usr/bin/perl
# use folderCreate <account> <folder1> [folder2]...
use strict;
use warnings;
use Mail::IMAPClient;

# Your Server FQDN or IP goes here
my $host="address";

# Your mboxadmin username goes here
my $username="mboxadminacct";

# Your mboxadmin password goes here
my $password="mboxadminpassword";


my $account = shift(@ARGV);
my $user="mboxadmin:$username:$account";      # Set up superuser login.
my $imap  = new Mail::IMAPClient( 'Server' => $host , 'User' => $user , 'Password' => $password  );   # connect to server.

while (my $folder = shift(@ARGV))
{
   $imap->create($folder)
                or die "Could not create folder $folder!\n";
}


Edit: Moved the following out of the loop

Code: Select all

 my $user="mboxadmin:$username:$account";      # Set up superuser login.
my $imap  = new Mail::IMAPClient( 'Server' => $host , 'User' => $user , 'Password' => $password  );   # connect to server.


Return to “Scalix Server”



Who is online

Users browsing this forum: Google [Bot] and 5 guests

cron