Hello,
I've spent the better part of an hour trying various combinations to get
this to work, and not one of them has been successful. :( Any assistance
that someone could provide would be greatly appreciated!
Here's the sendmail rule:
Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40,
T=DNS/RFC822/X-Unix,
A=procmail -Y -a $h -d $u
And something of a sendmail customization:
# not local -- try virtual hosts table
R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
R< $+ . > $* $: < $1 > $2 strip trailing dot
R< $* . $- . $- > $* < $2 . $3> $4 strip it down to domain
only
R< $+ > $* $: < $(virtdomain $1 $) > $2 lookup domain name
R< error : $- $+ > $* $#error $@ $1 $: $2 fail ungratiously
R< $- > $+ < @ $* > $* $#local $@ $2(_at_)$3 $: $1 return user and
dest
R< $+ > $* $: $2 clean it up
The gist of this is that I have a table that looks like this:
domain.tld <tab> localuser
The desire is to take all mail coming in to @*.domain.tld or @domain.tld and
redirect it thru procmail to the localuser's .procmailrc. The user should
then be able to take the "recipient" address (passed in with -a) and filter
or redirect the message as desired.
The problem is, I've tried all sorts of things but I can't get the -a argument
to expand, either by doing $@ or by putting "RECIP=$h" in the command line.
Any assistance would be greatly appreciated.
Mike was here...