[comp.mail.elm] Problems with From: and SCO's MMDF

oli@odbffm.incom.de (Oliver Boehmer) (05/12/91)

I'm using SCO Unix 3.2.0 and MMDF as my MTA together w/ elm 2.3 PL11.
I'm having a problem with the From: header: elm only builds something like
this
From: Oliver Boehmer <oli@odbffm>
but it should be
.... <oli@odbffm.incom.de>
I compiled the hostname into the program, still the same, then I omitted
the domain and told elm that my hostname is odbffm.incom.de, but still the
same. I went through mailmsg2.c, where the headers are being built, but I
didn't get it (to many  #ifdef for my mind... ;-} )
How do I have to set up elm so that this won't happen?
Tx, oli

-- 
Oliver Boehmer, Frankfurt, Germany           oli@odbffm.incom.de
+49-69-331461 (voice) +49-69-308265 (1200/2400)
If God is perfect, why did He create discontinuous functions?

syd@DSI.COM (Syd Weinstein) (05/13/91)

oli@odbffm.incom.de (Oliver Boehmer) writes:
>I'm using SCO Unix 3.2.0 and MMDF as my MTA together w/ elm 2.3 PL11.
>I'm having a problem with the From: header: elm only builds something like
>this
>From: Oliver Boehmer <oli@odbffm>
>but it should be
>.... <oli@odbffm.incom.de>
>I compiled the hostname into the program, still the same, then I omitted
>the domain and told elm that my hostname is odbffm.incom.de, but still the
>same.
Elm is probably not building the From: line.  Usually if a smart
MTA is being used (like MMDF) Elm lets it build the From: line.
So, first, check the config.sh file to see if Elm is building the
line or the MTA is.  The line is d_noaddfrom='define', if its define
Elm is not adding the from.

Second, It is the MTA's responsibility, most times, to qualify addresses,
so Elm would be correct passing the address in as unqualified and expecting
the MTA to handle it.

Lastly, as many have complained, Elm uses the format addr (Comment)
not the comment <addr> format, so I really suspect that the From: line
is from the MTA.
-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.                          Voice: (215) 947-9900
syd@DSI.COM or dsinc!syd                        FAX:   (215) 938-0235

chip@osh3.OSHA.GOV (Chip Yamasaki) (05/14/91)

In <1991May12.122703.5353@odbffm.incom.de> oli@odbffm.incom.de (Oliver Boehmer) writes:

>I'm using SCO Unix 3.2.0 and MMDF as my MTA together w/ elm 2.3 PL11.
>I'm having a problem with the From: header: elm only builds something like
>this
>From: Oliver Boehmer <oli@odbffm>
>but it should be
>.... <oli@odbffm.incom.de>
>I compiled the hostname into the program, still the same, then I omitted
>the domain and told elm that my hostname is odbffm.incom.de, but still the
>same. I went through mailmsg2.c, where the headers are being built, but I
>didn't get it (to many  #ifdef for my mind... ;-} )
>How do I have to set up elm so that this won't happen?

I could be wrong, but I don't think the problem here is Elm.  Try it
from /bin/mail and see if the same thing happens.  I think the problem
is with your MMDF mmdftailor file.  Check the MLNAME and MLDOMAIN
fields.  You may find them blank.  Also, are you checking the address
from a local machine or a remote machine?
-- 
--
Charles "Chip" Yamasaki
chip@oshcomm.osha.gov

chip@chinacat.unicom.com (Chip Rosenthal) (05/15/91)

In article <1991May14.054741.477@osh3.OSHA.GOV>
	chip@osh3.OSHA.GOV (Chip Yamasaki) writes:
>I think the problem is with your MMDF mmdftailor file.
>Check the MLNAME and MLDOMAIN fields.

The problem is that the distributed `ap=same' needs to be changed to
`ap=822' on the channels which generate off-site mail, e.g. the uucp
channel.

-- 
Chip Rosenthal  512-482-8260  |
Unicom Systems Development    |    I saw Elvis in my wtmp file.
<chip@chinacat.Unicom.COM>    |

jbev@iscden.jbsys.com (James C. Bevier) (05/15/91)

In article <1991May14.054741.477@osh3.OSHA.GOV> chip@osh3.OSHA.GOV (Chip Yamasaki) writes:
>In <1991May12.122703.5353@odbffm.incom.de> oli@odbffm.incom.de (Oliver Boehmer) writes:
>
>>I'm using SCO Unix 3.2.0 and MMDF as my MTA together w/ elm 2.3 PL11.
>>I'm having a problem with the From: header: elm only builds something like
>>this
>>From: Oliver Boehmer <oli@odbffm>
>>but it should be
>>.... <oli@odbffm.incom.de>
>>I compiled the hostname into the program, still the same, then I omitted
>>the domain and told elm that my hostname is odbffm.incom.de, but still the
>>same. I went through mailmsg2.c, where the headers are being built, but I
>>didn't get it (to many  #ifdef for my mind... ;-} )
>>How do I have to set up elm so that this won't happen?
>
>I could be wrong, but I don't think the problem here is Elm.  Try it
>from /bin/mail and see if the same thing happens.  I think the problem
>is with your MMDF mmdftailor file.  Check the MLNAME and MLDOMAIN
>fields.  You may find them blank.  Also, are you checking the address
>from a local machine or a remote machine?
>-- 
>--
>Charles "Chip" Yamasaki
>chip@oshcomm.osha.gov

The problem IS with ELM.  I have made modifications to ELM to have this work
correctly.  The mods below are to mailmsg2.c and are very minor.  The
changed lines have JCB on them.  So make the changes and see how it works.
The first change is for a problem when calling deliver to deliver the
mail. The second change is to properly put your domain on the from line.

Jim Bevier
jbev@jbsys.com

------------------------1st change ~line 390 ------------------


#ifndef JCB
	  sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
		mailer, mailerflags, expanded_to,
		remove_cmd, whole_msg_file, whole_msg_file);
#else
	  sprintf(very_long_buffer,"( (%s %s ; %s %s) & ) < %s", 
		mailer, mailerflags,
		remove_cmd, whole_msg_file, whole_msg_file);
#endif
	}
	
	fclose(reply);

	if(batch_only)
	  printf("Sending mail...\n");
	else {
	  PutLine0(LINES,0,"Sending mail...");
	  CleartoEOLN();
	}

---------------------------end of 1st change-----------------
-------------------------2nd change ~line 760 in mailmsg2.c------

#ifndef DONT_ADD_FROM
#ifdef MMDF
	is_submit_mailer = (strcmp(submitmail,mailer) == 0);
#endif /* MMDF */
# ifdef SITE_HIDING
#    ifdef MMDF
	if (is_submit_mailer)
/*JCB	  fprintf(filedesc,"From: %s <%s>\n", full_username, username); */
  fprintf(filedesc,"From: %s <%s@%s>\n", full_username, username, hostfullname);
	else
#    endif /* MMDF */
	if (is_hidden_user)
	  fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
		  hostname, HIDDEN_SITE_NAME, username);
	else
	  fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
		  hostname, username);
# else
#  ifdef  INTERNET
#   ifdef  USE_DOMAIN
#    ifdef MMDF
	if (is_submit_mailer)
/*JCB this is the one used */
/*JCB	  fprintf(filedesc,"From: %s <%s>\n", full_username, username); */
  fprintf(filedesc,"From: %s <%s@%s>\n", full_username, username, hostfullname);
	else
#    endif /* MMDF */
	  fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
		username, hostfullname);
#   else
#    ifdef MMDF
	if (is_submit_mailer)
/*JCB	  fprintf(filedesc,"From: %s <%s>\n", full_username, username); */
  fprintf(filedesc,"From: %s <%s@%s>\n", full_username, username, hostfullname);
	else
#    endif /* MMDF */
	fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
		username, hostname);
#   endif
#  else
#    ifdef MMDF
	if (is_submit_mailer)
/*JCB	  fprintf(filedesc,"From: %s <%s>\n", full_username, username); */
  fprintf(filedesc,"From: %s <%s@%s>\n", full_username, username, hostfullname);
	else
#    endif /* MMDF */
	fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
		hostname, username);
#  endif
# endif
#endif

	if (cc[0] != '\0')
	    fprintf(filedesc, "Cc: %s\n", format_long(long_cc, strlen("Cc: ")));

	if (copy && (bcc[0] != '\0'))
	    fprintf(filedesc, "Bcc: %s\n", format_long(long_bcc, strlen("Bcc: ")));

--------------------------end of change 2-----------------

syd@DSI.COM (Syd Weinstein) (05/16/91)

jbev@iscden.jbsys.com (James C. Bevier) writes Re From: lines and MMDF:
>The problem IS with ELM.  I have made modifications to ELM to have this work
>correctly.  The mods below are to mailmsg2.c and are very minor.

There are many ways to get the fully qualified name on the From: line.
Elm was designed to have the MTA qualify the name, so that the name
is qualified the way the site wants it to be qualified.
(In our case we don't want the node name, just the gateway name).

MMDF does allow this via the method Chip posted in his prior message.

Of course, as your posting shows, it is also possible to make Elm
do it via changing Elm.  However, it is our intention to have the MTA
handle this function.
-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.                          Voice: (215) 947-9900
syd@DSI.COM or dsinc!syd                        FAX:   (215) 938-0235

chip@osh3.OSHA.GOV (Chip Yamasaki) (05/19/91)

In <106@iscden.jbsys.com> jbev@iscden.jbsys.com (James C. Bevier) writes:

>The problem IS with ELM.  I have made modifications to ELM to have this work
>correctly.  The mods below are to mailmsg2.c and are very minor.  The
>changed lines have JCB on them.  So make the changes and see how it works.
>The first change is for a problem when calling deliver to deliver the
>mail. The second change is to properly put your domain on the from line.

Well, I don't know but I am using Elm 2.3 PL11 with SCO's MMDF and I
don't have any problems and have not had to make my own patches. 
-- 
--
Charles "Chip" Yamasaki
chip@oshcomm.osha.gov

mikes@iuvax.cs.indiana.edu (Michael Squires) (05/23/91)

In article <1991May19.024643.15169@osh3.OSHA.GOV> chip@osh3.OSHA.GOV (Chip Yamasaki) writes:
>
>Well, I don't know but I am using Elm 2.3 PL11 with SCO's MMDF and I
>don't have any problems and have not had to make my own patches. 

Ditto here (Hi, Chip!).


-- 

Mike Squires (mikes@iuvax.cs.indiana.edu)     812 855 3974 (w) 812 333 6564 (h)
mikes@iuvax.cs.indiana.edu          546 N Park Ridge Rd., Bloomington, IN 47408
Under construction: mikes@sir-alan.cica.indiana.edu

bernie@metapro.DIALix.oz.au (Bernd Felsche) (05/24/91)

In <1991May22.164455.16834@news.cs.indiana.edu> mikes@iuvax.cs.indiana.edu
   (Michael Squires) writes:

>In article <1991May19.024643.15169@osh3.OSHA.GOV> chip@osh3.OSHA.GOV (Chip Yamasaki) writes:
>>
>>Well, I don't know but I am using Elm 2.3 PL11 with SCO's MMDF and I
>>don't have any problems and have not had to make my own patches. 

>Ditto here (Hi, Chip!).

What's the trick to get the host.domain into the From: line. I've read
(superficially) all the install doc's but there's no clue :-(

Other than that, it compiled and works fine... even under SCO UNIX
-- 
Bernd Felsche,                 _--_|\   #include <std/disclaimer.h>
Metapro Systems,              / sale \  Fax:   +61 9 472 3337
328 Albany Highway,           \_.--._/  Phone: +61 9 362 9355
Victoria Park,  Western Australia   v   Email: bernie@metapro.DIALix.oz.au

das@trac2000.ueci.com (David Snyder) (05/25/91)

In article <1991May24.012153.9577@metapro.DIALix.oz.au>, bernie@metapro.DIALix.oz.au (Bernd Felsche) writes:
> What's the trick to get the host.domain into the From: line. I've read
> (superficially) all the install doc's but there's no clue :-(
> 
> Other than that, it compiled and works fine... even under SCO UNIX

In /usr/mmdf/mmdftailor, down where the channels are defined, the only channel
that should have ap=same is "local".  All others should have ap=822.

DAS
-- 
David A. Snyder @ UE&C - Catalytic in Philadelphia, PA

UUCP:  ..!uunet!trac2000!das     INTERNET:  das@trac2000.ueci.com

chip@osh3.OSHA.GOV (Chip Yamasaki) (05/26/91)

In <1991May24.012153.9577@metapro.DIALix.oz.au> bernie@metapro.DIALix.oz.au (Bernd Felsche) writes:

>In <1991May22.164455.16834@news.cs.indiana.edu> mikes@iuvax.cs.indiana.edu
>   (Michael Squires) writes:

>>In article <1991May19.024643.15169@osh3.OSHA.GOV> chip@osh3.OSHA.GOV (Chip Yamasaki) writes:
>>>
>>>Well, I don't know but I am using Elm 2.3 PL11 with SCO's MMDF and I
>>>don't have any problems and have not had to make my own patches. 

>>Ditto here (Hi, Chip!).

Hi Mike!

>What's the trick to get the host.domain into the From: line. I've read
>(superficially) all the install doc's but there's no clue :-(

>Other than that, it compiled and works fine... even under SCO UNIX

Well, this is a selected portion of my config.h file (remember that this
is generated so you shouldn't make your mods here).  I think this is
what makes the fully qualified address in the From: line for outbound
mail.

Hope it helps!

/* HOSTNAME:
 *	This symbol contains name of the host the program is going to run on.
 *	The domain is not kept with hostname, but must be gotten from MYDOMAIN.
 *	The dot comes with MYDOMAIN, and need not be supplied by the program.
 *	If gethostname() or uname() exist, HOSTNAME may be ignored.
 */
/* MYDOMAIN:
 *	This symbol contains the domain of the host the program is going to
 *	run on.  The domain must be appended to HOSTNAME to form a complete
 *	host name.  The dot comes with MYDOMAIN, and need not be supplied by
 *	the program.  If the host name is derived from PHOSTNAME, the domain
 *	may or may not already be there, and the program should check.
 */
#define HOSTNAME "osh3"		/**/
#define MYDOMAIN ".OSHA.GOV"		/**/

-- 
-----------------------+---------------------------------------------------
Charles "Chip" Yamasaki| The opinions expressed here are my own and are not
chip@oshcomm.osha.gov  | supported or even generally accepted by OSHA. :-)
-----------------------+---------------------------------------------------