passing $1 from sendmail to procmail

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Jul 12 02:34:10 PDT 2003


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 at 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 at elsewhere.com

which also covers the case where no +detail is given.

	Cheers,

	Matthew

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030712/8d99c1b9/attachment.bin


More information about the freebsd-questions mailing list