From owner-freebsd-isp Mon Dec 7 08:24:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA14153 for freebsd-isp-outgoing; Mon, 7 Dec 1998 08:24:19 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from aniwa.sky (p44-nas1.wlg.ihug.co.nz [216.100.145.44]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA14145 for ; Mon, 7 Dec 1998 08:24:14 -0800 (PST) (envelope-from andrew@squiz.co.nz) Received: from localhost (andrew@localhost) by aniwa.sky (8.8.8/8.8.7) with ESMTP id FAA28319; Tue, 8 Dec 1998 05:19:02 +1300 (NZDT) (envelope-from andrew@squiz.co.nz) Date: Tue, 8 Dec 1998 05:19:02 +1300 (NZDT) From: Andrew McNaughton X-Sender: andrew@aniwa.sky Reply-To: andrew@squiz.co.nz To: Paul Stewart cc: freebsd-isp@FreeBSD.ORG Subject: Re: procmail setup file In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 7 Dec 1998, Paul Stewart wrote: > Date: Mon, 7 Dec 1998 10:54:01 -0500 (EST) > From: Paul Stewart > To: freebsd-isp@FreeBSD.ORG > Subject: procmail setup file > > Hi there... > > We have a customer who has two email addresses directed to one mailbox. > One of the email addresses is user@abc.com and the other is > sameusername@differentdomain.com The server itself handles both abc.com > and differentdomain.com (the user has the choice of using either domain > name for their email address). > > What this user would like to do is have mail for abc.com forwarded to > differnetmailbox@abc.com and mail for differentdomain.com forwarded to > differentmailbox@differentdomain.com You want something like this: ----------------------- cut ------------------------ MAILDIR=$HOME/mail LOGFILE=$MAILDIR/log :0 c: * To:.*sameusername@abc.com ! differnetmailbox@abc.com :0: * To:.*sameusername@differentdomain.com ! differentmailbox@differentdomain.com :0: * To:.*sameusername@abc.com /dev/null ----------------------- cut ------------------------ Just in case both addresses are referred to in the same message, the first rule will not terminate the search, but any matches for that address get terminated by the third rule. Perhaps someone can correct me on my use of lock files? check out 'man procmailrc' and 'man procmailex' for more info. Andrew McNaughton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message