[comp.mail.sendmail] sendmail eats quoting characters

moore@cygnusx1.cs.utk.edu (Keith Moore) (03/13/89)

I'm in the process of writing a gateway between RFC822/RFC821
and MAIL-11/DECnet.  Naturally, it has to translate DECnet addresses
into something that is compatible with the RFCXXX world, and the 
inverse translation has to be applied for messages in the other
direction.

Since the From: address from DECnet may contain a quoted string,
my gateway is very careful to quote the quoted string properly.
For instance, the From: address BITNET%"USER@NODE" coming from
DECnet node UTKVX is translated into "BITNET%\"USER@NODE\""@UTKVX.DECnet
before it is handed to the local SMTP daemon, in this case sendmail.

As far as I can tell, sendmail handles this address correctly when
parsing headers and the like, treating the entire string 
"BITNET%\"USER@NODE\"" as a single token.  So far, so good.
On the other hand, in the Return-Path: header and when calling 
a mailer, sendmail strips the '\' characters from the string.
This happens even if the mailer description does not have the 's'
flag set.

The result of this is that I cannot reply to mail from
"BITNET%\"USER@NODE\""@UTKVX.DECnet, even though the address is
syntatically correct, and my Internet->DECnet mailer handles
this address correctly.

From a brief look at the sendmail sources, this looks like a difficult
problem to fix.  Perhaps the routine stripquotes() in util.c
needs to be fixed to restore the backslashes, but changing the behavior 
of this routine might break something else.

Has anyone found a way around this?
--
Keith Moore
UT Computer Science Dept.	Internet/CSnet: moore@utkcs2.cs.utk.edu
107 Ayres Hall, UT Campus	BITNET: moore@utkvx
Knoxville Tennessee 37996-1301	Telephone: +1 615 974 0822