Tracy R Reed <[EMAIL PROTECTED]> wrote:
>
> :0
> * ^[EMAIL PROTECTED]
> * ^Subject: test
> test.`/bin/date +%m%y`/new
>
> Mail to me with a subject of test goes to the specified maildir. Is it
> really necessary to append /new to the name of the Maildir?
Yes, unless you 1) use a patched procmail, or 2) use an external
delivery program. Ideally, you should use one with similar reliability
guarantees to qmail itself. Trusting procmail to deliver reliably seems
a little dangerous, in my opinion.
I recommend safecat, which you can find at
<http://www.pobox.com/~lbudney/linux/software/safecat.html>. Using the
embedded script `maildir', your rule would be rewritten as:
:0w <-- Needed for reliability
* ^[EMAIL PROTECTED]
* ^Subject: test
|maildir test.`/bin/date +%m%y` <-- Absolute path is better
> Before procmail would create the new mbox files for me automatically. It
> won't automatically create Maildirs for me. Anyone have a solution?
Two points for the modular approach! Wrap `maildir' in the following
script:
#!/bin/sh
# Create a Maildir, if it doesn't already exist
if test ! -d "$1"
then
maildirmake "$1" || exit 1
else
if test ! -d "$1"/tmp -o ! -d "$1"/new
then
echo "$1" exists, but is not a maildir. 1>&2
exit 1
fi
fi
exec maildir "$1"
Note that `maildirmake' must be on the PATH given to procmail, and you
should be conscious of the path to your maildir. safecat doesn't care
whether paths are relative or absolute; I recommend absolute. Just
prepend "$HOME/Mail/" to the maildir in the recipe above.
Len.
--
Exim seems to exhibit all the security design mistakes Sendmail has
made, only Exim handles them even more poorly than Mr. Allman does...
-- Dan Bernstein, author of qmail