procmail
[Top] [All Lists]

process maildirs from cron with formail and procmail?

2007-08-06 08:36:07
Hello,

I am setting up a mail server where messages are placed into
maildirs from procmail called as virtual transport agent by
postfix. Messages are then served to users from Dovecot.
This is all already working.
I also want to do what follows:

*) put all the incoming messages which match a certain recipe
   in the "incoming" procmailrc file into an auxiliary maildir,
   inbox.waiting
   All the others go into inbox.list_1, inbox.list2, inbox.main...
   This is already working

*) Every hour or so, process via cron all the messages in inbox.waiting/
   with another procmailrc file which says, basically

    recipe #1:   if message matches this, throw it away for good

    if it is for list_N (1,2... yes, there may be some in there), put
    it into inbox.list_N
    otherwise leave it into inbox.waiting (which I'd check every day or so,
    manually removing whatever is still there)

Now, I have read in several places that you can reprocess already delivered
messages with:

formail -s procmail -m another_procmail_file.rc < inbox.waiting

but I confess I have not clear at all if this will work safely when 
inbox.waiting
is a maildir and/or there are procmail/postfix delivering new messages
to any of the involved maiboxes and/or dovecot is serving messages to
users or their fetchmail.

So, basically, can you post-process maildirs with the approach above,even
when they are other processes using them? My understanding is yes, but
I would really like to hear your opinion before trying, to be sure I am
not forgetting anything (1) or there isn't some completely different way
to do this.

Thank you for your patience! Please don't hesitate to ask any questions
if anything is unclear!

marco
(1) like extra/special options to add in the another_procmail_file.rc

____________________________________________________________
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