John T Ellis <ellis(_at_)cork(_dot_)cig(_dot_)mot(_dot_)com> writes:
...
OK. By setting the DELIVERED variable to true, I'm able to stop my
original mail from being bounced. However, although my mail folder gets
updated correctly with the full message, the procmail log shows that the
assigned folder is **Lost**. Why's that?
Because that's what procmail does when you set DELIVERED to true. If
it really bothers you you can instead put
:0
/dev/null
at the end of the rc file. There's another way around it -- see below.
Also, do you have any comments on the way we've configured this setup?
Specifically, do you think there is a better way to achieve what I'm
trying to do?
The eternal question arises: what are you trying to do?
Depending on how you are willing to handle certain cases, there may be
cleaner ways of doing this. For example, you currently handle messages
with certain subjects by refiling additional copies of the messages
into other mailboxes. What should happen if a message has both
"update" and "open" in the subject? If that "can't happen", or if it's
okay to put copies in both mailboxes, then the following rc file is cleaner:
LOGFILE = /usr/test/mcsc/etc/log
MAILDIR = /usr/test/mcsc/var/spool/mail/
SHELL = /bin/sh
VERBOSE = on
DEFAULT = $MAILDIR/mcscmail # or, put an explicit recipe at the end
:0 c
* ^Subject:.*update
updspool
:0 c
* ^Subject:.*open
opnspool
:0 c
* ^Subject:.*close
clsspool
If it must only deliver to at most one of the "spool" mailboxes, then you
can either use what you have, or try:
LOGFILE = /usr/test/mcsc/etc/log
MAILDIR = /usr/test/mcsc/var/spool/mail/
SHELL = /bin/sh
VERBOSE = on
DEFAULT = $MAILDIR/mcscmail # or, put an explicit recipe at the end
:0 c
* ^Subject:.*\/(update|open|close)
{
:0
* MATCH ?? update
updspool
:0
* MATCH ?? open
opnspool
:0
* MATCH ?? close
clsspool
}
Does that make sense?
BTW: if those mailboxes are files (and not directory style mailboxes), then
you should use locallockfiles with them. Put another colon after the zero
(or flag(s)) on the recipes that deliver to them.
Philip Guenther