[comp.mail.misc] Sendmail rewrite language

kyle@xanth.UUCP (Kyle Jones) (09/28/87)

In <1692@umix.cc.umich.edu>, honey@umix.cc.umich.edu (Peter Honeyman) writes:
> i've seen sendmail hacks (from waterloo?) that let rewrite rules munge
> addresses with $>program.

I was told of this several months ago and thought it was a great idea.
I was about to implement it here until I realized the amount of
overhead it would entail per message.  Sendmail calls those rewrite
rules a LOT.

Still, the current rewrite language IS rather inscrutable.  Any
suggestions for a replacement?  I think the current parse code could
be excised without too much difficulty.

kyle jones  <kyle@odu.edu>  old dominion university, norfolk, va  usa

joe@haddock.ISC.COM (Joe Chapman) (09/29/87)

Peter Honeyman:
>>i've seen sendmail hacks (from waterloo?) that let rewrite rules munge
>>addresses with $>program.

Kyle Jones:
>I was told of this several months ago and thought it was a great idea.
>I was about to implement it here until I realized the amount of
>overhead it would entail per message.  Sendmail calls those rewrite
>rules a LOT.

Me:
I assume that you wouldn't be using such a trick in ruleset 3, only
after you'd munched and crunched the address down to size and were
left with, say, foo!bar and no direct link to the machine foo.  Under
the circumstances you either route or reject the mail, and if you use
a program to find routes it doesn't seem to me make much difference
whether sendmail exec's it or someone else.

I tried the $>program hack and didn't like it for some reason---I
think it's because there's little space left for magic cookies like
that in sendmail (or I was tired when I prototyped it and the code was
lousy).  I now use the $[ and $] canonicalization operators and allow
alternate ``name servers'' (either a program, or a dbm file, or an
actual network service) to be specified per ruleset.  If you have to
talk to really bizarre mail systems this is a big win---you can
declare `tr Rr Ww' to be a nameserver for .BARBARA-WALTERS.COM, for
example.

Joe Chapman
harvard!ima!joe

chips@usfvax2.UUCP (09/29/87)

In article <2581@xanth.UUCP>, kyle@xanth.UUCP (Kyle Jones) writes:
>
> Still, the current rewrite language IS rather inscrutable.  Any
> suggestions for a replacement?  I think the current parse code could
> be excised without too much difficulty.
> 
> kyle jones  <kyle@odu.edu>  old dominion university, norfolk, va  usa

How about feeding the mail header through an awk program?  Awk programs are
quite readable.  (Especially compared to the existing sendmail language.)

In fact, I think I'll try it here...

P.S.  I'm not a sendmail guru, but I know enough about mail to install smail
      on an oddball system. (Xenix System V -- SVID with Berkeley-derived mail!)
-- 
Chip Salzenberg            "chip%ateng.uucp@UU.NET"  or  "uunet!ateng!chip"
A.T. Engineering, Tampa    CIS: 73717,366    Last Chance: "chips@usfvax2.UUCP"
"Use the Source, Luke!"    My opinions do not necessarily agree with anything.