[comp.mail.sendmail] Problems with relaying email...

rainwatr@ucunix.san.uc.edu (Don Rainwater) (04/24/91)

	I'm having some problems with mail from my Ultrix 4.1 system.
Apparently, the headers aren't coming out quite right.  The "real" From:
header seems to be okay, since it comes out as username@ucunix.san.uc.edu
(as it should).  However, up above this in the headers is another line
that contains username@ucunix.  The name of this header line is called
either From or Return-path:, depending on the receiving machine.  When
it's a Return-path line, the address is enclosed in <>.

	For reasons of alias substitution, all mail from this Ultrix
system is forwarded (using a default relay definition in sendmail) to a
VMS system running PMDF, which then delivers the message to its
destination.  So mail travels from point A to point C via point B.

	The big problem is this:  Replying to one of these mail messages
from a machine that calls this user@simple-hostname construct a From
line is unsuccessful, since it tries to use this information instead of
the real (correct) From: line a few lines down.  There is no problem on
systems that treat this information (correctly?) as a Return-path: line,
since these systems use the real From: line instead.

	Anyone have any suggestions?  Is this a sendmail problem, a PMDF
problem, or something entirely different?  Thanks for any information.

rickert@mp.cs.niu.edu (Neil Rickert) (04/24/91)

In article <1991Apr24.134148.24430@ucunx1.san.uc.edu> Don.Rainwater@UC.Edu writes:
>
>	I'm having some problems with mail from my Ultrix 4.1 system.
>Apparently, the headers aren't coming out quite right.  The "real" From:
>header seems to be okay, since it comes out as username@ucunix.san.uc.edu
>(as it should).  However, up above this in the headers is another line
>that contains username@ucunix.  The name of this header line is called
>either From or Return-path:, depending on the receiving machine.  When
>it's a Return-path line, the address is enclosed in <>.

  This sounds like a configuration error on the Ultrix system.  It is the
responsibility of that system to ensure that all mail leaving the system
has proper return address, meaning fully qualified domain names.  You
will need to look at the mailer definition for the mailer being used to
send out this mail.  The mailer definition line begins with 'M', and you
can determine which mailer is being used by sending mail with /usr/ucb/Mail
using the '-v' (verbose) option.

  Once you have found the mailer definition, you will see it probably contains
something like
Mtcp, P=[IPC], F=CDFMXhnmu, S=12, R=11 .........

 The 'S=' operand is the one to look for.  That is the ruleset used to rewrite
the sender addresses.  Actually, it is used for both the 'From:' header,
and for the envelope address used in the 'Return-Path:' line.  But there are
some subtle difference which may account for what is happening.

 Assuming this is mail originating on the Ultrix system, the envelope
sender address starts as 'username', and is then reprocessed by the sequence
of rewrite rulesets:  3,1,4,3,1,12,4   (where 12 should be replaced by whatever
your mailer definition specifies).  The 'From:' header, on the other hand, is
probably being rewritten with the sequence of rulesets: 3,1,4,3,1,12,4,3,1,12,4.
In some cases, it may be rewritten only with 3,1,12,4.

 There is probably something peculiar in your rulesets 1 or 12, so that whether
the address goes through that ruleset an odd number or an even number of
times changes its format.  You will probably need to do some testing with
'sendmail -bt' to track this down.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

davecb@yunexus.YorkU.CA (David Collier-Brown) (04/24/91)

| In article <1991Apr24.134148.24430@ucunx1.san.uc.edu> Don.Rainwater@UC.Edu writes:
[...]		    However, up above this in the headers is another line
| >that contains username@ucunix.  The name of this header line is called
| >either From or Return-path:, depending on the receiving machine.  When
| >it's a Return-path line, the address is enclosed in <>.

rickert@mp.cs.niu.edu (Neil Rickert) writes:
|   This sounds like a configuration error on the Ultrix system.  It is the
| responsibility of that system to ensure that all mail leaving the system
| has proper return address, meaning fully qualified domain names. 

 Ok so far, but you also have to look at the expression used to generate
the `from ' line: on my Suns it's 

DlFrom $g $d

... which drives our DECs and VAXen dotty.  $g needs to turn into the full
return address, not the short form.  I usually use $q, but that's machine-
specific.  Your milage may vary.

--dave
-- 
David Collier-Brown,  | davecb@Nexus.YorkU.CA | lethe!dave
72 Abitibi Ave.,      | 
Willowdale, Ontario,  |  Today's featured dish:
CANADA. 416-223-8968  |      Sun-dried alligator.

peter@cutmcvax.cs.curtin.edu.au (Peter Wemm) (04/26/91)

rickert@mp.cs.niu.edu (Neil Rickert) writes:

>In article <1991Apr24.134148.24430@ucunx1.san.uc.edu> Don.Rainwater@UC.Edu writes:
>>
>>	I'm having some problems with mail from my Ultrix 4.1 system.
>>Apparently, the headers aren't coming out quite right.  The "real" From:
>>header seems to be okay, since it comes out as username@ucunix.san.uc.edu
>>(as it should).  However, up above this in the headers is another line
>>that contains username@ucunix.  The name of this header line is called
>>either From or Return-path:, depending on the receiving machine.  When
>>it's a Return-path line, the address is enclosed in <>.

>  This sounds like a configuration error on the Ultrix system.  It is the
>responsibility of that system to ensure that all mail leaving the system
>has proper return address, meaning fully qualified domain names.  You
>will need to look at the mailer definition for the mailer being used to
>send out this mail.  The mailer definition line begins with 'M', and you
>can determine which mailer is being used by sending mail with /usr/ucb/Mail
>using the '-v' (verbose) option.

From my experience, the ultrix sendmail has some very bizare "features".
Normal sendmail used the $j macro as the fully qualified domain name..
But ultrix uses $j as the hostname only, and selectively decides if and
when to add the domain name....

I had all sorts of trouble, and nothing seemed to cure it..  So we junked
the Ultrix (BTW ver 3.0) version and got Sendmail 5.65b/IDA-1.4.3 and
are Extremely happy with it...  If you can get it, USE IT!

>-- 
>=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
>  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
>  Northern Illinois Univ.
>  DeKalb, IL 60115                                   +1-815-753-6940
--
Peter Wemm
------------------------------------------------------------------------------
peter@cs.curtin.edu.au  (Home) +61-9-450-5243
Curtin University of Technology, Perth, Western Australia.
Amiga... Because life is too short for boring computers. (Dan Zerkle)