Dear All
I just noticed that all folders which show up on Horder aren't showing in Thunderbird, I have to manually subscribe them and then they come.
I need a script to auto subscribe all user folders to their respective folders, in Outlook
Can someone please advise how thats done. Below is a script which I supposed would work, But I am not sure I want to try on one domain the below script can someone verify this, or provide a new one, completely.
#!/usr/bin/perl
use Cwd;
opendir(DOMAIN, '/mail') or die "Unable to opendir /mail";
while($domain = readdir DOMAIN)
{
next if ($domain eq '.' or $domain eq '..');
opendir(LETTER, "/mail/$domain");
while($letter = readdir LETTER)
{
next if ($letter eq '.' or $letter eq '..');
opendir(ACCOUNT, "/mail/$domain/$letter");
while($account = readdir ACCOUNT)
{
#next if($domain ne 'wilkshire.net' $account ne 'cody');
next if ($account eq '.' or $account eq '..');
opendir(MDIR, "/mail/$domain/$letter/$account/.maildir");
print("/mail/$domain/$letter/$account/.maildir\n");
open(SUBSCRIBED, ">/mail/$domain/$letter/$account/.maildir/courierimapsubscribed");
print(SUBSCRIBED "INBOX\n");
while($_ = readdir MDIR)
{
next if ($_ eq '.' or $_ eq '..');
next if !/\./;
print(SUBSCRIBED 'INBOX'.$_."\n");
}
close(SUBSCRIBED);
chown(89,89, "/mail/$domain/$letter/$account/.maildir/courierimapsubscribed");
}
}
}
I just noticed that all folders which show up on Horder aren't showing in Thunderbird, I have to manually subscribe them and then they come.
I need a script to auto subscribe all user folders to their respective folders, in Outlook
Can someone please advise how thats done. Below is a script which I supposed would work, But I am not sure I want to try on one domain the below script can someone verify this, or provide a new one, completely.
#!/usr/bin/perl
use Cwd;
opendir(DOMAIN, '/mail') or die "Unable to opendir /mail";
while($domain = readdir DOMAIN)
{
next if ($domain eq '.' or $domain eq '..');
opendir(LETTER, "/mail/$domain");
while($letter = readdir LETTER)
{
next if ($letter eq '.' or $letter eq '..');
opendir(ACCOUNT, "/mail/$domain/$letter");
while($account = readdir ACCOUNT)
{
#next if($domain ne 'wilkshire.net' $account ne 'cody');
next if ($account eq '.' or $account eq '..');
opendir(MDIR, "/mail/$domain/$letter/$account/.maildir");
print("/mail/$domain/$letter/$account/.maildir\n");
open(SUBSCRIBED, ">/mail/$domain/$letter/$account/.maildir/courierimapsubscribed");
print(SUBSCRIBED "INBOX\n");
while($_ = readdir MDIR)
{
next if ($_ eq '.' or $_ eq '..');
next if !/\./;
print(SUBSCRIBED 'INBOX'.$_."\n");
}
close(SUBSCRIBED);
chown(89,89, "/mail/$domain/$letter/$account/.maildir/courierimapsubscribed");
}
}
}