procmail
[Top] [All Lists]

Re: Self-Modifying .procmailrc

1997-10-06 19:57:17
        Author:        "Matthew G. Saroff" <msaroff(_at_)pca(_dot_)net>
        Original-Date: Mon, 6 Oct 1997 21:22:39 -0500 (CDT)
        Message-ID:    
<Pine(_dot_)LNX(_dot_)3(_dot_)95(_dot_)971006211348(_dot_)28644A-100000(_at_)pcans1(_dot_)pca(_dot_)net>

I have my .procmailrc setup to forwward email to another (email
only) account.  When I am not going to be at the account, I turn
forwarding off.

no no... easiest way to do that is this:

# look for the file to tell us whether or not to forward mail or not
# if the file exists, forward the mail
:0c
* ? test -r $HOME/.forwardmail
! me(_at_)elsewhere(_dot_)com

# if a message arrives from the other account
# with the Subject 'forward-off' then remove the
# file, effectively turning off forwarding
:0hi
* ^From:(_dot_)*me(_at_)elsewhere\(_dot_)com
* ^Subject: forward-off
|/bin/rm -f $HOME/.forwardmail


# if a message arrives from the other account
# with the Subject 'forward-on' then remove the
# file, effectively turning off forwarding on
:0hi
* ^From:(_dot_)*me(_at_)elsewhere\(_dot_)com
* ^Subject: forward-on
|/bin/touch $HOME/.forwardmail

Others might need to pound out bumps, but I did this for quite some time

TjL



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