If you just want to deal with mail to your account, it's very easy to
do this with procmail.  Procmail comes with RedHat Linux and is what
sendmail uses to do the deliveries, so you don't need any .forward
incantation to enable procmail processing, as the procmail man pages
would suggest.

Check out the various procmail-related manual pages for examples, but
basically all you need to do is to put something similar to the
following in $HOME/.procmailrc.

----
LOGFILE=$HOME/Procmail.log
VERBOSE=ON
SHELL=/bin/sh
MAILDIR=$HOME/mail

:0 c
* ^From.*@work_domain.com
! [EMAIL PROTECTED]
----

The first two lines are useful if you have lots of rules and want to make
sure things are working.  The logfile grows fast if you have lots of rules
and lots of mail, so you probably don't want to leave it enabled once you
check things out.  For the simple rule above, you don't need log.

The "c" in ":0 c" causes procmail to continue even though the mail matches
the recipe and delivers the mail to your alternate address.  Normally a
a matching recipe which "delivers" the mail causes further processing to
stop (including the default action of delivering the mail to your normal
mailbox).  By telling procmail to continue after doing the forward, you
don't need an explicit rule to deliver the mail to your mailbox.


        pete peterson
        GenRad, Inc.
        7 Technology Park Drive
        Westford, MA 01886-0033

        [EMAIL PROTECTED] or [EMAIL PROTECTED]
        +1-978-589-7478 (GenRad);  +1-978-256-5829 (Home: Chelmsford, MA)
        +1-978-589-2088 (Closest FAX); +1-978-589-7007 (Main GenRad FAX)
 





> Date: Thu, 18 May 2000 20:50:43 +1000
> From: Darryl Harvey <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: sendmail filter rules??
> Message-Id: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
> 
> This is probably not the correct list to ask on, but I am after some 
> sendmail config help?
> 
> 
> I am temporarily going overseas, and I want to re-direct any mail received 
> from a particular domain (IE: my work) to me at temporary email 
> address  where I will be.
> 
> So will sendmail allow me to configure it to monitor the incoming mail and 
> if any mail from "*@work_domain.com" comes into my server, it will send a 
> copy locally and also re-direct it to me at a second email address.
> 
> 
> IE: just like the .forward options, but not for every email, only selected 
> ones.
> 
> Thanks
> Darryl


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to