Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!ispd-newsserver!ism.isc.com!b1!ico!iscden!jbev From: jbev@iscden.jbsys.com (James C. Bevier) Newsgroups: comp.mail.elm Subject: Re: Problems with From: and SCO's MMDF Message-ID: <106@iscden.jbsys.com> Date: 15 May 91 16:41:50 GMT References: <1991May12.122703.5353@odbffm.incom.de> <1991May14.054741.477@osh3.OSHA.GOV> Organization: J B Systems on HiPeak, Morrison, Co. Lines: 119 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 >>but it should be >>.... >>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-----------------