Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Nov 97 01:59:57 -0500
From:      Timothy J Luoma <luomat+freebsd+questions@luomat.peak.org>
To:        John Hanton <silverthorn@cableinet.co.uk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: .forward splitting?
Message-ID:  <199711200659.BAA14320@luomat.peak.org>
In-Reply-To: <3473D55F.74B4C654@cableinet.co.uk>
References:  <3473D55F.74B4C654@cableinet.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
	Author:        John Hanton <silverthorn@cableinet.co.uk>
	Original-Date: Thu, 20 Nov 1997 06:14:55 +0000
	Message-ID:    <3473D55F.74B4C654@cableinet.co.uk>

> e.g.  Our domain is ukswc.org and the members of staff are
> seastorm@ukswc.org, pistol@ukswc.org and pilsner@ukswc.org


> I want the seastorm one to go go my account, seastorm@cableinet.co.uk,
> the pistol one to go to pistol@clara.net
> and the pilsner one to go to jcise@enterprise.net.

Use procmail.  Set up a .forward that looks like this:

"|IFS=' '&&p=/usr/local/bin/procmail&&test -x $n&&exec $p -Yf-||exit 75  
#silverthorn"

NOTE:  that must be ONE LONG LINE.  NO EOL/CRs!  Make sure to point it to  
your procmail path.  Change 'silverthorn' to whatever your email name is on  
that machine

Then make a .procmailrc like this


SHELL=/bin/sh
PATH=your:path:here
LOGFILE=$HOME/.procmail.log
MAILDIR=$HOME/mail		# THIS BETTER EXIST!



# Catch mail loops !
:0:
* ^X-Loop: silverthorn@cableinet\.co\.uk
IN.mailloop


# add a header we can check to try and prevent mail loops
:0fhw
| formail -I"X-Loop: silverthorn@cableinet.co.uk"


:0
* ^TOseastorm@ukswc\.org
! seastorm@cableinet.co.uk

:0
* ^TOpistol@ukswc\.org
! pistol@clara.net

:0
* ^TOpilsner@ukswc\.org
! jcise@enterprise.net


There's a very good procmail mailing list.  Type 'procmail -v' at the  
commandline for the subscribe address...

Using procmail I can subscribe to 14 of the FreeBSD mailing lists and they  
all go into their own folders (with only a 10 line procmail recipe too!)

TjL




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711200659.BAA14320>