Nice Plugin! Really useful!
The syntax scares me a little, it reminds me of that brief period when I tried to configure Emacs to read Usenet with Gnus...
Ha, have you ever hacked a sendmail config? I am not talking about the .mc template, but the .cf file?
Before I have to write and/or extend the cf file manually, I'd rather flogg myself using a whip with barbed wire as tails while hanging upside down from my testicles.
I had to check what that was and ok, I believe you:
# You have two choices here. If you want the gateway machine to identify
# itself as the DOMAIN, use this line:
Dj$m
# major relay mailer - typical choice is "ddn" if you are on the
# Defense Data Network (e.g. Arpanet or Milnet)
DMsmartuucp
# checkpoint the queue after this many recipients
OC10
# refuse to send tiny messages to more than these recipients
Ob10
# handle "from:<>" special case
R$*<>$* $@@ turn into magic token
# basic textual canonicalization
R<$*<@$+>> $@$1<@$2>
R$*<$+>$* $2 basic RFC822 parsing
# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@$+,$+:$+ @$1:$2:$3 change all "," to ":"
R@$+:$+ $@$>6<@$1>:$2 src route canonical
R$+:$*;@$+ $@$1:$2;@$3 list syntax
R$+@$+ $:$1<@$2> focus on domain
R$+<$+@$+> $1$2<@$3> move gaze right
R$+<@$+> $@$>6$1<@$2> already canonical
# convert old-style names to domain-based names
# All old-style names parse from left to right, without precedence.
R$-!$+ $@$>6$2<@$1.uucp> uucphost!user
R$-.$+!$+ $@$>6$3<@$1.$2> host.domain!user
R$+%$+ $@$>3$1@$2 user%host
# Final Output Post-rewriting
S4
R$+<@$+.uucp> $2!$1 u@h.uucp => h!u
R$+ $: $>9 $1 Clean up addr
R$*<$+>$* $1$2$3 defocus
# Clean up a name for passing to a mailer
# (but leave it focused)
S9
R$=w!@ $@$w!$n
R@ $@$n handle <> error addr
R$*<$*LOCAL>$* $1<$2$m>$3 change local info
R<@$+>$*:$+:$+ <@$1>$2,$3:$4 <route-addr> canonical