procmail
[Top] [All Lists]

Re: matching on HOST

1997-11-06 11:56:47
Excerpts from mail: (06-Nov-97) matching on HOST by Bill Pemberton
I've got a (I think) a fairly simple question... We've got a case where
users have their home directories shared among several machines, but
the mail spool is NOT shared. Obviously, their .forward will get read
and procmail will be run on all the machines. What I need is to be able
to do a procmailrc that will forward all the mail to one of the
machines and then on that machine it should run whatever rules the user
wants.

This is best accomplished with a properly written .forward file. I live in an
environment under similar circumstances and have used the following .forward
file for a couple years now most successfully:

"|IFS=' ';if test .`/bin/uname -n` = .foobar.your.domain ; then
p=/your/path/to/procmail && test -f $p && exec $p -Yf- || exit 75; else exec
/usr/lib/sendmail -oi username(_at_)foobar(_dot_)your(_dot_)domain; fi"

That should be all on one line. It's wrapped here for e-mail transport.

The file examples/advanced in the procmail source code hierarchy suggests
something similar, but I've made a few improvements to it.

Later,
Ed

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