procmail
[Top] [All Lists]

Re: keep a copy and forward mail

1999-05-26 13:39:44
Hi,
On May 26,  9:24am, Paul Vanukoff wrote:

Why don't you do something simple like:

:0 c
$INBOX

:0
!user(_at_)domain(_dot_)com
You could simply replace it with
:0c
!user(_at_)domain(_dot_)com
        As it will get forward, and go to the default mailbox, or perhaps to
somewhere else as dictated by the filters.
        Here is a slightly more involved set of recipes, which sends my stoff
to my work accound, and I turn off forwarding when I am not at work:
# if a message arrives from the other account
# with the Subject 'zzzzstopforward' then remove the
# file, effectively turning off forwarding
:0hi
* ^Subject: zzzzstopforward
|/bin/rm -f $HOME/.forwardmail

# if a message arrives from the other account
# with the Subject 'zzzzgoforward' then creating the
# file, effectively turning on forwarding on
:0hi
* ^Subject: zzzzgoforward
|/bin/touch $HOME/.forwardmail

#forward copies of everything to my work mail
#the .forwardmail file is how I turn on and off my forwarding.
:0c
* ! ^X-Loop: msaroff(_at_)pca\(_dot_)net  #VERY IMPORTANT--PREVENTS MAIL LOOPS
* ? test -r $HOME/.forwardmail #see if file exists, if so, forward
{
        :0fhw
        | formail -I"X-Loop: msaroff(_at_)pca(_dot_)net #ADDS X-LOOP TO PREVENT 
LOOPS
        :0
        !matthew(_dot_)saroff(_at_)lmco(_dot_)com
}

        Tis does a pretty good job, but you probably want to screen
On Wed, 26 May 1999, Rabia Q. wrote:


Hi,

how i can configure my procmail to do the following...
accept email, leave a copy at my current mailbox , and forward
a copy to other address.

so it will be ...

1. accept From *.* anything...
2. keep a copy in my mailbox
3. forward with TO: address user(_at_)subdomain(_dot_)domain(_dot_)com

the problem that i have is with the forwarding , because
i need to use formail and make it looks from:<original email>
to:<user(_at_)subdomain(_dot_)domain(_dot_)com>


how i can do it ?
thanks for your help.


-- End of excerpt from Paul Vanukoff



-- 
Matthew Saroff
Do not reply directly to this message.  Reply to
msaroff(_at_)pobox(_dot_)com

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