

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in net.sourceforge.lists.courier-users[courier-users] Lots of shared folders| From | Sent On | Attachments |
|---|---|---|
| Daniel Kasak | Oct 27, 2005 5:44 pm | |
| Sam Varshavchik | Oct 27, 2005 6:34 pm | |
| Daniel Kasak | Oct 27, 2005 9:32 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [courier-users] Lots of shared folders | Actions... |
|---|---|---|
| From: | Daniel Kasak (dka...@nusconsulting.com.au) | |
| Date: | Oct 27, 2005 5:44:17 pm | |
| List: | net.sourceforge.lists.courier-users | |
Greetings.
Long, long ago, I set up our shared folders incorrectly. I've now decided to fix things so we can upgrade to the latest courier-imap.
What is the recommended way of setting up lots of shared folders?
Here's what we'd really like to have:
- A series of shared folders with file numbers relating to our clients, eg: 529 530 531
- Shared folders underneath each of these folders, eg: 52900 Some Client Name 52901 Some Other Client Name 52902 Yet Another Client Name
I'm still unclear on whether this ( subfolders of shared folders ) is a supported feature or not. Can I do this? If so, how?
Any help greatly appreciated.
I'm working on a Perl script to upgrade our old mail folders ( there are a LOT ). So people can get some idea of what I'm thinking of doing, here it is:
#!/usr/bin/perl -w use strict;
#use File::Copy;
my $source_folder = "/usr/local/share/maildirs/"; my $dest_folder = "/usr/local/share/new_maildirs/";
opendir MYDIR, $source_folder;
my @directory_contents = readdir MYDIR;
foreach my $item ( sort(@directory_contents) ) {
if ( length($item) > 4 ) {
print "Processing $item\n";
my $new_name = substr( $item, 5, length($item)-5 ); my $new_path = substr( $item, 1, 3 );
print " ... Full Path is: " . $dest_folder . "." . $new_path . "/" . $new_name . "\n\n";
# Create a new folder with the new name mkdir( $dest_folder . "." . $new_path . "/" . $new_name ) || die "Error creating folder " . $dest_folder . $new_path . "/" . $new_name;
# Add slashes to file names $new_name =~ s/ /\\ /g; $item =~ s/ /\\ /g;
# Copy everything from the old directory to the new one my $command = "cp -R $source_folder" . $item . "/* " . $dest_folder . "." . $new_path . "/" . $new_name;
system( $command );
} elsif ( length($item) == 4 ) {
print "Creating shared maildir: $item\n";
my $new_directory = substr( $item, 1, 3 );
#mkdir( $dest_folder . $new_directory ) || die "Error creating directory $new_directory!\n"; my $command = "maildirmake -s write -f $new_directory $dest_folder"; system ( $command );
}
}
-- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dka...@nusconsulting.com.au website: http://www.nusconsulting.com.au







