[net.mail] Need some subtle help....

greid@adobe.UUCP (Glenn Reid) (02/08/86)

I am having a little bit of a problem with sendmail rules.  In
particular, local mail across ethernet is being troublesome.

What I want to do is to send mail from one machine (call it
"caslon") to another machine (call it "adobe") in such a way as to
remove the host name from the From: field and Return-Path: fields.
This way, mail between hosts can be transparent, and mail can be
sent to just 'username' and it will get to the correct place.

In Ruleset 11 there is a rule which allows the sending mailer to
tack on its hostname:

R$+			$@$1<@$w>			tack on our hostname

This rule seems to be the offender.  If the rule is commented out,
then mail from caslon sent *through* adobe to the outside world
(like UUCP mail to a neighboring host) works fine, and there is no
mention of "caslon" in the message, except in the "Received-From:"
lines.  That is fine.  The problem is that if the mailer on adobe
things that it is local mail, it drops it on the floor.  In
/usr/spool/mqueue/syslog the line to=greid, stat=Sent is completely
missing, and the mail is vapor:

"/usr/spool/mqueue/syslog":
Feb  7 16:02:15 localhost: 19861 sendmail: AA19861: message-id=<8602080008.AA07685@caslon.UUCP>
Feb  7 16:02:16 localhost: 19861 sendmail: AA19861: from=<greid>, size=202, class=0

If I put the above-mentioned sendmail rule back in, the mail is
delivered fine on adobe, but the from field looks like:

From: greid@caslon@caslon

which I consider to be unnaceptable.  My question:  is there some
way to make this work reasonably?  Can I fool my mailer on adobe to
deliver these messages, even though it thinks it got them over the
ethernet from itself?

Thanks for any and all help.  I am kinda stumped.

Glenn Reid
  Adobe Systems
  {glacier,decwrl,sun}!adobe!greid

sob@soma.UUCP (Stan Barber) (02/12/86)

I usually do this at the level of the mailer section of the sendmail.cf.

The S= and R= fields in the mailer definition point at rules to rewrite
From: and To: to your specifications.

What I would do is define a class of hosts with the C macro and then
use a rule like this.

#define Class of special hosts
CS host1 host2 host3

#begin rewriting rule to take a specila host name out 
# this is probably more than actually has to be done
# comments welcome
# remembr the $w is defined as your local hostname
S31
R$=w!$+			$2				strip local name
R$*@$=w			$1				strip local name
R$=S!$+			$2				strip special name
R$*@$=S			$1				strip special name
R$*<@$=S>		$1				strip special name
R$*<@$=S.$->		$1				strip special name
R$*<@$->$*		$1<@$2.UUCP>$3			resolve abbreviations
# special case for UUCP mailer, may be different for ARPA
R$+			$:$w!$1

Anyway, this is the rewrite I use for the From: field.
Example mailer

Muucp, P=/usr/bin/uux,F=sDFuUM,S=31,
	A=uux -a$g -gC $h!rmail ($u)

Hope this is helpful.

-- 
Stan	        uucp:{shell,rice,drilltech}!soma!sob   Opinions expressed
Olan		ARPA:sob@rice.arpa		       here are ONLY mine &
Barber		CIS:71565,623   BBS:(713)660-9262      noone else's.