procmail
[Top] [All Lists]

Re: fowarding mail

1997-05-30 19:02:00
On Fri, 30 May 1997, Norbert Erkeland wrote:

etmnoer> My incomming e-mail is treated by different mail servers which
etmnoer> don't have the same software installed. My procmailrc script is
etmnoer> executed on the mail treating server and one of the servers
etmnoer> does not contain the binary i wan't to have executed by
etmnoer> procmailrc. The mail treating server can only be determined by
etmnoer> examening the $HOST environment variable, not from the e-mail's
etmnoer> header contents. From the procmail man-pages i can't figure a
etmnoer> way to create a recipe to check on environment variables values
etmnoer> for forwarding mail. Does anyone have a sugestion ??? What i
etmnoer> want is depending on the name of the server to forward the
etmnoer> e-mail to another server or treat the e-mail by the procmailrc
etmnoer> script. 

Here are a couple of approaches that might work for you:

1. Examine your sendmail.cf for a O ForwardPath line.  If there is a  
   $z/.forward.$w component, then you can rename your .forward as
   .forward.somehost and it will only be invoked on that host.  I use
   this technique, since my home directory is exported to several hosts
   that don't have (a recent version of) procmail.

2. Include a test for the existence of procmail as part of its
   invocation in your .forward file, e.g.

"|IFS\' '&&p=/usr/local/bin/procmail&&test -f $p&&exec $p -f- || exit 75 
#etmnoer"

Regards,
-- 
   Rick Troxel     Rick_Troxel(_at_)nih(_dot_)gov     
rick(_at_)helix(_dot_)nih(_dot_)gov
     http://www.dc-sage.org/bios/rick_troxel  301/435-2983
/////////////////////////////////////////////////////////////////
All effort and exertion put forth by man from the fullness of his
heart is worship, if it  is prompted  by the  highest motives and
the will to do service to humanity.                 --Abdu'l-Baha

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