On Fri, 4 Mar 2005, Gerry wrote:

> It must be built off of the regexp map like this but I don't understand what 
> to put in the last line to actually get it to deliver to someone else.
>
> #LOCAL_CONFIG
> Kallnumbers regex -a at MATCH ^[0-9]+$
> LOCAL_RULESETS
> SLocal_check_mail          # check address against\
>                             various regex checks
> R$*                        $:  $>Parse0 $>3 $1
> R$+ < @ bigisp.com.  >48   $:  $(allnumbers $1 $)
> R at MATCH                    $#error $:553 Header Error


Looks like at this point after it matches the regexp, you need to re-write 
the hostname to be @faxserver.bigisp.com and then return a mailer 
definition...

But it might be easier to modify your regexp match so that it has to match 
both 10-digits in the address part AND not already be 
@faxserver.bigisp.com ( ^[0-9]+ at bigisp.com$ ), and then just return the 
new address so Sendmail will then handle it "normally".  This is probably 
easier and safer than returning a mailer directly.  Matching both criteria 
is essential so you don't form a loop.

I may be able to offer more help off-list if you need it.

> But even if I figure that out, what am I supposed to put in an mc file (as 
> opposed to the cf file) ?

Take a look at the sendmail/cf directory.  There's a README that explains 
this.  You basically need to create an m4 file in feature/ or hack/ maybe 
call it faxhack.m4.  Look at the other files in these 2 directories to see 
how to do it.  Then you'd just call it in your mc file:

FEATURE(`faxhack')dnl

>
> I'm running Redhat 9 and sendmail-8.12.
>
> Displaying my ignorance,

No!  Few mortals can look at a sendmail.cf without turning to stone.  But 
you, dear adventurer, have joined an elite club.  Eric Allman will be over 
shortly to show you the secret handshake.