Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Dec 1998 05:19:02 +1300 (NZDT)
From:      Andrew McNaughton <andrew@squiz.co.nz>
To:        Paul Stewart <pstewart@kawartha.com>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: procmail setup file
Message-ID:  <Pine.BSF.4.05.9812080507590.12456-100000@aniwa.sky>
In-Reply-To: <Pine.BSF.3.96.981207104615.18150A-100000@shell.kawartha.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 7 Dec 1998, Paul Stewart wrote:

> Date: Mon, 7 Dec 1998 10:54:01 -0500 (EST)
> From: Paul Stewart <pstewart@kawartha.com>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9812080507590.12456-100000>