procmail
[Top] [All Lists]

Re: .forward switched of by sysadmin: How to use procmail?

2000-01-13 21:50:36
Thomas Ziegler <zie(_at_)iis(_dot_)fhg(_dot_)de> writes:
...
I've been using this script for quite a while now until I had to realize
that apparently mails are disappearing. My .procmailrc is very simple:

#
# The litte brothers database extracts email addresses and
# stores it in ~/mail/
#
:0hc
| /home/zie/bin/linux/lbdb-fetchaddr
                                     
:0:
* ^TO(_dot_)*procmail(_at_)*
$HOME/mail/procmail

This almost certainly doesn't mean or do what you think it does.  The ".*"
after the "^TO" is likely to be unneeded (the ^TO expansion includes
something similar) and "@*" tells procmail to match zero or more at-signs.
You probably want to instead write:
        :0:
        * ^TOprocmail@
        $HOME/mail/procmail

Ditto for the other recipes with "^TO.*" and "@*".


...
:0
* ^From.*zie
* ^Subject:.*test
{
:0
$HOME/mail/zie.test
}

Unless you have a recipe immeadiately after this with the 'A', 'a',
'e', or 'E' flags, the above is equivalent to:

        :0
        * ^From.*zie
        * ^Subject:.*test
        $HOME/mail/zie.test


As it does not contain any DEFAULT-variable, procmail reads from the
standard system mailbox and writes the result back to it again. The docu
says, that procmail locks the system mailbox before doing any operation on
it. If sendmail is already writing to the system mailbox -- e.g. after
receiving a new message --, procmail should detect that as well and delay
the write process.

Seems doubtful.  I would suggest that you specify a logfile at the top
of you .procmailrc and if that doesn't show anything after a while,
try putting VERBOSE=on up at the top also.

BTW: how do you know that messages are being lost?  Have you checked the
logs generated by your MTA (probably sendmail)?


Philip Guenther