[comp.mail.sendmail] how do I get those stupid 822 source routes out of my From_ line

murrey@lehi3b15.UUCP (Erik Murrey) (04/16/89)

Sendmail 5.61++/IDA-1.2.8

Problem:
	my sendmail puts source routes in the From_ line for
	mail bound for local delivery..

How can I get sendmail to convert the 822 Source routes into at least
a ! path, or keep in a user@host form.  Even when the originating host
is fully qualified via a nameserver, if it goes through an
intermediate machine, sendmail tacks on another part to the source
route..  The end result is that my From_ lines look like a mess.
(Yes, my From: lines are intact..)


Here is an excerpt from deliver.c for local delivery:

	/* rewrite from address, using rewriting rules */
	expand("\001f", buf, &buf[sizeof buf - 1], e);
	(void) strcpy(tfrombuf, remotename(buf, m, TRUE, TRUE, FALSE));

	define('g', tfrombuf, e);		/* translated sender address */
	define('h', host, e);			/* to host */
	Errors = 0;
	pvp = pv;
	*pvp++ = m->m_argv[0];

	/* insert -f or -r flag as appropriate */
	if (FromFlag && (bitnset(M_FOPT, m->m_flags) || bitnset(M_ROPT, m->m_flags)))
	{
		if (bitnset(M_FOPT, m->m_flags))
			*pvp++ = "-f";
		else
			*pvp++ = "-r";
		expand("\001g", buf, &buf[sizeof buf - 1], e);
		*pvp++ = newstr(buf);
	}

Lovstrand.EuroPARC@Xerox.COM (04/22/89)

In article <546@lehi3b15.UUCP> murrey@lehi3b15.UUCP (Erik Murrey) writes:
> 
> Sendmail 5.61++/IDA-1.2.8
> 
> Problem:
> 	my sendmail puts source routes in the From_ line for
> 	mail bound for local delivery..

The "From " line contains a direct copy of the envelope's sender
address, which by definition of RFC821 should contain a path back to
the sender.  If you don't like the RFC822 Source Route format, try
forcing all local envelope addresses through rule S19 of the IDA
Sendmail.mc file.  This will convert them into !-paths, but still keep
the whole route there.

Ie. change the Mlocal mailer to use S=19/0 in the mailer defintion.

Hope this helps,
--Lennart <Lovstrand.EuroPARC@Xerox.COM>
Rank Xerox EuroPARC, 61 Regent St, Cambridge, England.