it's been a few decades that i had to deal with sendmail (i have a vage memory of having read the whole book on it, though i could be wrong because i also remember joking that i was waiting for the movie instead of reading the book)
anyways, after staring at this for a few minutes and without looking up any syntax, a few things became noticeable:
R$* < @ $* .$m. > $* is matching a pattern, with each $* being assigned to $1, $2 and $3 respectively.
$m must contain the local domain. so effectively this pattern matches any mail addressed to a host with the local domain.
$#smtp if that pattern matches, use smtp,
$@ $2.$m. by connecting to $2.$m. (which means, just use the host that was specified in the original mail)
$: $1 < @ $2.$m. > $3 (not sure what this part does. my guess is: rewrite the email address as specified here, that is in this case don't rewrite it at all.)
it's terse, but regular expressions are worse than this particular example.
now i need to go look up the syntax to see how much i actually got right.
for example i have no idea what the $3 parameter is for. i am guessing $1 is the part before the @ in an email. $3 could be the From address or have something to do with alternate addressing schemes