procmail
[Top] [All Lists]

Re: Can procmail deliver to mbox and maildir for the same user?

2005-01-14 15:33:06
Toen wij David W. Tamkin kietelden, kwam er dit uit:
Ruud H.G. van Tol:

Often, the copy-message is delivered in that {}-block,
otherwise you would end up with 2 copies (actually 1 original
and 1 copy) delivered to the same place.
(Which happens to everybody, now and then.)

Sometimes intentionally: I had a situation where I wanted the clone to
survive the nesting block [during which it had been filtered] and to
be processed, alongside the original, by the remaining recipes in the
rcfile.

Yes, often is not always, and happening is not happying. :)

I am also cloning messages in many ways. A recent project:

a web-form that results in a highly structured e-mail-message;

a copy of that message is immediately stored (by procmail)
in a file with a filename based on a <code> (that is
calculated by procmail from the date and the PID);

if the self-approval-field contains a proper e-mail-address
(as decided by procmail), then that address receives (from
procmail) a highly-filtered version of the message, exposing
details from the headers like X-Remote-Addr, X-Http-X-Forwarded-For,
X-Http-Via (anonymous proxies are blocked) to discourage the
usage of the form as an anonymous mailer;
otherwise, a small group of moderators (=me) get that highly-
filtered version of the message (from procmail);

this filtered version has 2 reply-options: a normal reply is an
approval, a clickable mailto:address?subject=reject_<code>
formats a rejection-mail;

the approval/rejection-message is processed and checked (by
procmail);

with approval, the original highly structured version of the
message is retrieved from the file and reprocessed (by proc-
mail) to create a minimal version of the highly-filtered
version, which is given to a mail2news-script (to post the
'flesh' of user's input on the web-form to a certain
newsgroup);

before posting, a thread-start-message is send to the newsgroup,
with a Message-ID based on the daynumber within the current month,
which results in a maximum of 3 thread-start-messages per month;

each posting contains a References-header with the Message-ID of
the current thread-starter, to make threading possible.

Most of this is already working: the postings are done.
The moderation-side still needs a little work. Currently I need
to resend (I use the bounce of mutt) the original message to the
To:address to approve a message, which is OK until I am off-line.

-- 
Grtz, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail