procmail
[Top] [All Lists]

Re: How to detect "How procmail was called?"

2009-01-16 11:14:27
On Thu, Jan 15, 2009 at 12:03 PM, Michelle Konzack
<linux4michelle(_at_)tamay-dogan(_dot_)net> wrote:
Hello,

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
variable.

If you have to, you can do this by building a wrapper script around procmail:

#!/bin/sh
export PROCMAIL_CALLER=fetchmail
exec procmail "$@"

Then in fetchmailrc you invoke the wrapper instead of procmail.  Use a
different wrapper for courier, etc.
____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>