[net.mail.headers] Sendmail munges addresses containing dollar signs.

mcgregor%hplabs.csnet@CSNET-RELAY.ARPA (09/07/85)

  ---------- "Sendmail munges addrs containing dollar signs" ----------

We have begun mail service with a mail system in which users names contain
dollar signs ($). We are using Sendmail on an Amdahl 470 running V.2 Unix.

Whenever we mail to an address containing a dollar sign, or receive mail
which contains a dollar sign in the To address field it gets munged by
Sendmail. Specifically, the mail will be delivered with the TO field
slightly altered.  For example, mail to going into sendmail like this,

        To: mvs!$scott       becomes

        To: mvs!cott         while

        To: mvs!$will        becomes

        To: mvs!hpcccill

The reason for this strange behavior is that sendmail is interpretting
the imbedded dollar sign and trailing character as a sendmail macro.
"$s" in our sendmail.cf file isn't defined, so it comes out null, while
"$w" is our local host name, so it comes out expanded as the host name.

Now, only the text of the TO message is munged, the user name and host
name passed as parameters to the mailer get the original name containing
the dollar sign.  Thus, at present, we can get the right parameter but the
wrong text, or, by using sending to $$scott we can get $scott to appear in
the To: field, but then the parameter (still $$scott) is wrong.

Our question is how to get sendmail to pass the dollar sign containing
addresses without munging them. We have already identified ways of dealing
with these dollar sign addresses non-transparently, but we are still
wondering if we can pass mail containing dollar signs without munging
them.   If anyone has already done this and can
send me the proper sendmail.cf config definitions, I would appreciate a
copy. Also, if someone hasn't done this but finds this an interesting
puzzle and comes up with something that should work send me a copy.
(I doubt that others in this forum would have much interest, so it
is probably best to mail to me directly.) Thanks!


            Scott McGregor
            ...!hplabs!hpccc!mcgregor
            HP Corporate Computing Center

chris@columbia.UUCP (Chris Maio) (09/08/85)

This is an old, old problem, since "$"'s occur in BITNET mail addresses
all the time.  Eric Allman, sendmail's author, promised a fix a long
time ago (his solution was to turn $'s into ^A's when reading the .cf
file) but I never heard anything more about it.  Does anyone know when
the latest version of sendmail is going to be distributed?

							Chris

chris@umcp-cs.UUCP (Chris Torek) (09/08/85)

$ signs are indeed turned into ^As internally in the sendmail that
will be distributed with 4.3.  (So *that*'s what all those \001s
in the source are for. . . .)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

JSOL%BUCS20%bostonu.csnet@CSNET-RELAY.ARPA (Jon Solomon) (09/08/85)

You probably can't get the sendmail.cf file to deal with this, as it
is the primary reason for the $'s existance in the parsing rules. Like
any "quote character", sending two of them generally allows one to
pass through. You will probably have to modify the source to sendmail
(if you have it) to explicitely copy the To: field byte by byte, adding
an extra $ for each $ encountered. Such a fix is trivial:

fix_to_line(to_line)
char *to_line;
{
	char line[MAX];
	int i, len, j = 0;

	len = strlen(to_line);
	for (i = 0; i < len; i++) {
		if (to_line[i] == '$')
			line[j++] = '$';
		line[j++] = to_line[i];
	}
	return(&line);

Cheers,
--JSol

steveh@hammer.UUCP (Stephen Hemminger) (09/10/85)

The 4.3 version of sendmail has:
1) all $ are now converted to ^A on config file read in.
2) new [host] operator to canonicalize hostnames.
3) your domain is defined with ONnetname

other goodies...