[alt.sources] [comp.mail.sendmail] Sendmail.cf to handle 'user at host' as well as 'user@host.at'

parmelee@wayback.cs.cornell.edu (Larry Parmelee) (03/20/90)

Original-posting-by: parmelee@wayback.cs.cornell.edu (Larry Parmelee)
Original-subject: Re: Oh no, its the " at " question again ...
Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)

[This is an experimental alt.sources re-posting from the newsgroup(s)
comp.mail.sendmail. Comments on this service to emv@math.lsa.umich.edu 
(Edward Vielmetti).]


The "at" -> "@" translation is a pretty old, no longer current
standard, and generally a Bad Thing to do on the Internet these days.
Drop it if at all possible.

If you MUST support this translation, about the only safe way to
do it is to define a Class  consisting of all the mail punctuation
characters, and  change only those "at"s which are not preceeded or
followed  by one of the punctuators.

Define a class "P" of all the punctuation characters:
	CP. : % @ ! ^ = / [ ]

Using class "P", translate "at"s:
	R$*$~Pat$~P$*   $1$2@$3$4

-Larry Parmelee
parmelee@cs.cornell.edu