procmail
[Top] [All Lists]

Re: Querying a DB to determine destination mailbox for an email using Procmail

2011-10-27 23:40:21
Another approach which I haven't yet seen mentioned, is to have procmail deliver TO the perl/whatever script, and have THAT script deal with delivery (though it must also deal with locking).

Your perl script can do the db operation, get a mailbox name, then append the message to it.

:0
| /path/to/perlscript


Safer, you could follow this with fallback handling - if the perlscript returns a nonzero result code, procmail can deliver the message to a default mailbox:

:0w
| /path/to/perlscript

:0:
problem.mbx
---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
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