Web Mail


Single IP

Project Links
resume
about me
about server
user land
webmail

Photo Albums
bpfountz
lpfountz
twice DIGITAL

Web Pages
bpfountz
lpfountz

Reviews
3054CB
Netgate Q&A
5354AP1 Aries2

You are visiting...
The DigitalPimp


created by:
 Ben Pfountz
Untitled Document
Using Shared Folders

FreeBSD 4.9-STABLE

The Digitalpimp Collection

Ben Pfountz

March 18, 2004

 

Background:

 

Shared folders allow email clients to share folders for certain purposes. For example, I am going to set up a shared junk-mail folder to allow my users to check for incorrectly flagged junk mail.

 

Shared folders is described in the latest imap standard, but unfortunatly outlook express does not support them very well. At the time of this writing, my clients will be able to use sqwebmail or thunderbird (by the makers of mozilla) to access shared folders. Users not needing to view the shared folder can still use outlook express.

 

I should also mention that shared-folders are not ment to have mail delivered to them directly. They were ment to allow users to transfer messages into them for sharing. This is done for security purposes, but sometimes too much security is just annoying, so there if you are using maildrop to deliver your mail, there is a workaround listed below.

 

First, read the manpage for maildirmake, specifically the section for shared folders. Here are the highlights.

 

 

A user wishing to create a shared folder will need to do the following:

 

To create a sharable maidir:

maildirmake -S [path_of_maildir]

 

To create a sharable folder within a maildir:

maildirmake -s read -f [new_folder_name] [path_of_maildir]

 

A user wishing to access another person's shared maildir will need to do the following:

 

maildirmake --add [folder_alias]=[path_of_shared_maildir] [path_of_my_maildir]

 

Morphing a maildir to a shared-maildir:

 

In my case, I just wanted to share a folder in my own maildir with a few other users. (which is also not recommended for security purposes) I simply created a shared folder, and watched to see what maildirmake set on the shared folder. Then I applied those changes manually to my junk-mail folder.

 

Shared-maildirs need to be chmod 755 from the root all the way to the shared folder. The messages within the shared folder must be chmod 644.

 

chmod 755 $HOME/Maildir

find $HOME/Maildir/.Junk\ Mail -type d -exec chmod 755 {} \;
find $HOME/Maildir/.Junk\ Mail -type f -exec chmod 644 {} \;

Normally, my clients would then have to log into my server and run the maildirmake --add command in order to access my shared folder. Since my clients do not have permission to log into my server, I will do this for them.

 

cd [client-maildir]

add the following line to the file 'shared-maildirs':

[folder_alias] [path_of_shared_maildir]

 

Shared-Maildir Delivery Issues

 

I use blackhole to flag my spam, then I use maildrop to deliver it to my junk-mail folder. The bad news is, maildrop always delivers mail with permissions 600, which means that our clients will not be able to view any freshly delivered messages. There is no way around this without modifying the rule that delivers mail to the junk-mail folder. Since I let my users access their maildrop filter via sqwebmail, and sqwebmail does not support changing default delivery permissions, this must be done by me as root. The good news is that it is just a simple rule change, and not a software hack that must be re-applied after every update.

 

The old rule:

 

##Op:startswith
##Header:subject
##Value:SPAM:
##Folder:.Junk Mail
##From:
##PlainString
##Name:BlackHole JunkMail


if ((/^subject: *SPAM\:/))
{
to "./Maildir/.Junk Mail/."
}

The new rule:

 

##Op:startswith
##Header:subject
##Value:SPAM:
##Folder:.Junk Mail
##From:
##PlainString
##Name:BlackHole JunkMail


if ((/^subject: *SPAM\:/))
{
UMASK="033"
to "./Maildir/.Junk Mail/."
}

Now new messages delivered to the junk-mail folder will have read permissions compatible with the shared-folder. Leaving the UMASK within this particular rule means that mail delivered to other folder will still only be readable by me.

 

 

Install Notes
a7v bios
os notes
os install
kernel cfg
ports update
vinum
soft updates
quotas
public pmsns
firewall
named
ppp
dhcpd
samba
apache+modssl
mod_php5
proftpd
qmail
blackhole
courier-imap
shared-folders
sqwebmail
skeleton
dependencies
nut
automount
net-snmpd
mrtg
system update
system config
formt floppy
wireless IPsec
bdes cdrw's
MySQL
Cert Auth
CPES AD 1
CPES AD 2
CPES Grp Plcy
AD1 <-> AD2
AD Reference