From owner-freebsd-questions@FreeBSD.ORG Sat Jul 12 02:34:10 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3007637B401 for ; Sat, 12 Jul 2003 02:34:10 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D0AE43F93 for ; Sat, 12 Jul 2003 02:34:08 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h6C9XuAI069744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 Jul 2003 10:34:03 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h6C9XtMr069743; Sat, 12 Jul 2003 10:33:55 +0100 (BST) (envelope-from matthew) Date: Sat, 12 Jul 2003 10:33:55 +0100 From: Matthew Seaman To: David Banning Message-ID: <20030712093355.GB69146@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , David Banning , questions@freebsd.org References: <20030712080712.GA29189@skytrackercanada.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IrhDeMKUP4DT/M7F" Content-Disposition: inline In-Reply-To: <20030712080712.GA29189@skytrackercanada.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-11.4 required=5.0 tests=AWL,BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: questions@freebsd.org Subject: Re: passing $1 from sendmail to procmail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2003 09:34:10 -0000 --IrhDeMKUP4DT/M7F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 12, 2003 at 04:07:12AM -0400, David Banning wrote: > I have been attempting to get the $1 passed from sendmail to > do some mail filtering in Procmail. My existing sendmail .mc > file is; You mean the +detail you can add to an e-mail address, as in username+detail@example.com ? That should just work. It's generally supported within sendmail.cf so long as you configure a local mailer that can handle it -- in your case 'FEATURE(local_procmail)' will be sufficient. One exception in the .mc file: the +detail stuff is not preserved when looking up an address in aliases or .forward files unless you add FEATURE(preserve_local_plus_detail) Otherwise, you will need to make provisions in genericstable and virtusertable to support it: genericstable -- you need both of these lines: john j.doe john+* j.doe+%1 virtusertable -- '+' is a wildcard match character, and you end up with %2 containing 'detail' and %3 containing '+detail', so you can do: j.doe+*@thefirstplace.com john-doe%3@elsewhere.com which also covers the case where no +detail is given. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --IrhDeMKUP4DT/M7F Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/D9YDdtESqEQa7a0RAol0AJ9t9WI1k4r4Nig5cu0HwjWqLkXM/wCdG+93 0DW6c3cXRsejHoYwb8QB00g= =RsOG -----END PGP SIGNATURE----- --IrhDeMKUP4DT/M7F--