How to detect "How procmail was called?"
barton.schaefer at gmail.com
Fri Jan 16 17:12:09 CET 2009
On Thu, Jan 15, 2009 at 12:03 PM, Michelle Konzack
<linux4michelle at tamay-dogan.net> wrote:
> Is there an easy way to detect inside the procmailrc, whether procmail
> was called from fetchmail or called by ~/.courier which is only a pipe?
I'd have to say no, there isn't.
Your best bet is probably to have the caller put something to identify
itself into an environment variable, and then test the value of that
If you have to, you can do this by building a wrapper script around procmail:
exec procmail "$@"
Then in fetchmailrc you invoke the wrapper instead of procmail. Use a
different wrapper for courier, etc.
More information about the procmail