procmail
[Top] [All Lists]

How to pipe only if certain file exists?

2005-07-12 12:23:17
Hi,

I have a multi-boot machine, and use the same home directory with
different debian distributions.  If I am checking mail and the spam
filter /usr/bin/qsf exists, I would like to pipe my mail through it.
But if it doesn't exist, I don't want to try to pipe the mail through
it.  I tried all sorts of things, such as the following, but all were
unsuccessful:
    :0
    |   test [ -e /usr/bin/qsf ]
        :0 wf
            | qsf -sra
    
    
    :0
    *$ $IS_EXIST /usr/bin/qsf
    | qsf -sra

Basically (as is obvious), I have no idea how to do this and was
randomly guessing.  Any suggestions would be appreciated.

Ric

         

____________________________________________________________
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>