On Fri, Aug 22, 2003 at 04:06:04PM -0700, Andreas Stollar wrote:
I am not a C++ programmer either, and I am much lazier. I set up my global
/etc/maildroprc file to autocreate Maildirs with this simple sh script:
# Global maildrop filter file
# Uncomment this line to make maildrop default to ~/Maildir for
# delivery- this is where courier-imap (amongst others) will look.
DEFAULT="$HOME/Maildir/"
`until test -d $HOME/Maildir; do /usr/local/bin/maildirmake $HOME/Maildir;
done`
it has been working for months in my production system, an 20 node cluster
with 100,000 accounts.
yes - it works, but only for INBOX ... what about other folders?
e.g. i have .mailfilter file with filtering many mailing lists to
separate folders - now i have something like this:
MAIL_ADRESAR=$HOME/Maildir
AKTUALNY_MESIAC=`date +%Y-%m`
# courier
if (/^List-Id: Courier mail server mailing list
<courier-users.lists.sourceforge.net>/:h)
{
`if [ ! -d "$MAIL_ADRESAR/.tools.courier-users-$AKTUALNY_MESIAC" ]; then \
maildirmake "$MAIL_ADRESAR/.tools.courier-users-$AKTUALNY_MESIAC"; \
fi`
to "$MAIL_ADRESAR/.tools.courier-users-$AKTUALNY_MESIAC"
}
# maildrop
if (/^List-Id: <courier-maildrop.lists.sourceforge.net>/:h \
|| /^List-Post:.*cour...@lists.sourceforge.net>/:h)
{
`if [ ! -d "$MAIL_ADRESAR/.tools.maildrop-$AKTUALNY_MESIAC" ]; then \
maildirmake "$MAIL_ADRESAR/.tools.maildrop-$AKTUALNY_MESIAC"; \
fi`
to "$MAIL_ADRESAR/.tools.maildrop-$AKTUALNY_MESIAC"
}
with autocreating Maildirs this should look like:
if (/^List-Id: Courier mail server mailing list
<courier-users.lists.sourceforge.net>/:h)
to "$MAIL_ADRESAR/.tools.courier-users-$AKTUALNY_MESIAC"
if (/^List-Id: <courier-maildrop.lists.sourceforge.net>/:h \
|| /^List-Post:.*cour...@lists.sourceforge.net>/:h)
to "$MAIL_ADRESAR/.tools.maildrop-$AKTUALNY_MESIAC"
default value - autocreate maildirs