procmail
[Top] [All Lists]

Re: Mailbox permissions and formail

2001-08-09 13:58:38
David Stone <dstone(_at_)chem(_dot_)utoronto(_dot_)ca> writes:
Here's the information (originally sent as "Procmail/Formail question...")
Since sending the original message, I also remembered that I'd recently
received an automated notification that the sysyem had reset my mailbox
permissions to 700 (and I remember something about mailboxes not being
group-writable?)
...
Running on RH Linux 7.x (how do I check this?)
PROCMAIL VERSION:  procmail v3.21 2001/06/29
Your system mailbox:  /var/spool/mail/dstone

Version 3.21 has some problems writing to maildirs.  You should either
switch to version 3.15.2 or not use maildirs.  No, I don't know when
version 3.22 will be released.


MAILDIR=/var/spool/mail/$LOGNAME      # !!! location of mail folders

Setting MAILDIR makes procmail change directories to the specified path,
so that better be a directory.  Do you really want to do that?

Since the value you give above is just $DEFAULT, I'd suggest replacing
$MAILDIR with $DEFAULT throughout your rcfile.


PATH=$PATH:/$HOME/bin:/usr/lib

PATH includes $HOME/bin by default.  If you added /usr/lib to make it
easier to invoke sendmail, then you must have overlooked the SENDMAIL
variable which handles it for you.  I would suggest removing that line
completely.



:0:
* [some match condition]
| formail -A "X-Sorted: IN_MAIL_TAG" >> $MAILDIR

As David pointed out, the shell doesn't know how to append to a maildir
folder.  If you really want your mailspool to be in maildir format then
you either need to let procmail do the delivery (but see my first comment)
or use safecat to do the delivery.  safecat is a separate package that
just does delivery to maildir folders.  You can find it from the qmail
homepage http://www.qmail.org/  (look under maildir software).

If you use safecat, the line would become:

        :0
        * [ conditions go here ]
        | formail -A"X-Sorted: IN_MAIL_TAG" | safecat $DEFAULT/tmp $DEFAULT/new


If you wanted to use procmail's built in delivery to maildir folders then
you'll need to use a filtering recipe followed by a delivering recipe:

        :0 fw
        * [ conditions go here ]
        | formail -A"X-Sorted: IN_MAIL_TAG"

        :0 a
        $DEFAULT


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>