Mail cannot be delivered directly to filesystem-based shared folders.
As it was decided (for whatever reason). But it seems the only issue is
getting articles from the new/ directory into cur/ where imapd will open
them (i can deliver articles, mv them over by hand, and they magically
show up on the list).
Well, since i'm already "outside the box" i can supplant other minds
:)... i wrote a simple script to move articles from the new/ dir into
cur/ for "Filesystem-based shared folders". This won't notify clients
with their shared copy open, but upon next entrance, the articles will
show up at least. Yeah, it's hokey, but provides us with a useful
feature given our configuration.
.mailfilter:
# mask to allow group access
UMASK=037
# spawn mover (which waits a few secs) to migrate delivered mail
# from new/ dir into cur/ dir, accessible as shared folder
exception {
cc "| ./mail-mover"
}
# deliver straight to sub-folder (only if it already exists)
exception {
to "./.$1/."
}
exit
The mail-mover script :
#! /bin/sh
# funky joo-joo to move ourself into background
# if no tty, assume running in maildrop, else everything in foreground
/usr/bin/tty > /dev/null 2>&1
if [ $? -ne 0 ]; then
if [ -z "$_MMOVERBG" ]; then
export _MMOVERBG=1
exec $0 >> /dev/null 2>&1 &
exit
fi
fi
# prevent maildrop finishing up from closing us down
trap "" SIGHUP
# settle a few seconds to let article(s) finish queuing (if in
"async" mode)
[ -n "$_MMOVERBG" ] && sleep 5
# process the new/ dir of all folders
for folder in .??*/maildirfolder; do
f="`/usr/bin/dirname $folder`"
mv $f/new/*,S=* $f/cur
done
exit 0