The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IMAP Folder Subscription

Discussion in 'E-mail Discussions' started by mohdyasar, Feb 1, 2008.

  1. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    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");
    }
    }
    }
     
  2. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    No body Helping

    Please help me sort this out ..

    Thanks
     
  3. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    You got me wrong

    Kent
    Thanks for the reply

    But I think you got me wrong, I am using a webmail client, not outllook or thunderbird.

    My Folders which are subscribed in Horde do not actually show up as subscrobed in Roundcube (Webmail)

    What could be the problem.
     
  5. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Addition

    I mean

    I tried webmail and oulook both

    The problem wtill remains the same,
     
Loading...

Share This Page