Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!hplabs!hplabsc!daemon From: jw@pan.UUCP Newsgroups: comp.mail.elm Subject: Message-ID: <1805@hplabsc.HP.COM> Date: Wed, 13-May-87 01:03:45 EDT Article-I.D.: hplabsc.1805 Posted: Wed May 13 01:03:45 1987 Date-Received: Sat, 16-May-87 06:40:09 EDT Sender: daemon@hplabsc.HP.COM Reply-To: mcvax!pan!jw@seismo.CSS.GOV Lines: 118 Approved: taylor@hplabs (with 'postmail') To: Path: pan!jw From: jw@pan.UUCP (Jamie Watson) Newsgroups: comp.mail.elm Subject: Problem with mailer on System V.3 Message-ID: <260@pan.UUCP> Date: 10 May 87 21:18:57 GMT Reply-To: jw@pan.UUCP (Jamie Watson) Distribution: world Organization: Pansystem Informatik AG, Zuerich, Switzerland Lines: 106 ---___---___--- In the standard configuration, elm tries to use sendmail to deliver its messages; if this is not present, it tries /bin/rmail. On System V.3, and most other USG systems, /bin/rmail is simply a link to /bin/mail, so it behaves pretty much the same way. The V.3 version of /bin/mail has been changed, so that it adds a blank line to the beginning of the message it is given (between the first line of the message and the 'From_' line it adds), in order to avoid confusion of the body and header of the message. This is a problem with messages generated from elm, because it causes the header that elm produces to be considered a part of the body of the message. There are two solutions, according to the V.3 User's Reference Manual. The flag "-s" on the command line will suppress the addition of the blank line, or if the first line of the message is 'Subject: ...' the addition of the blank line is suppressed, even without the command line switch (sounds like a pretty shady hack to me...). Changing the command line would cause extra work all around, because it would then require adjustment in Configure.sh based on whether a particular system required this flag or not. So it seems we are stuck with rearranging the header. The only potential problem I see with this is that it might break some other inteligent mail reader, although I don't think this is the case. This file can (hopefully) be fed to patch. The changes are: *** mailmsg2.c.B --- mailmsg2.c *************** *** 85,91 Raw(OFF); if (isatty(fileno(stdin))) { fclose(reply); /* let edit-the-message open it! */ ! printf("To: %s\nSubject: %s\n", expanded_to, subject); strcpy(editor, "none"); /* force inline editor */ if (no_editor_edit_the_message(filename)) { return(0); /* confused? edit_the_msg returns 1 if bad */ --- 85,91 ----- Raw(OFF); if (isatty(fileno(stdin))) { fclose(reply); /* let edit-the-message open it! */ ! printf("Subject: %s\nTo: %s\n", subject, expanded_to); strcpy(editor, "none"); /* force inline editor */ if (no_editor_edit_the_message(filename)) { return(0); /* confused? edit_the_msg returns 1 if bad */ *************** *** 533,538 return(NULL); /* couldn't open it!! */ } #ifdef SITE_HIDING if ((is_hidden_user = is_a_hidden_user(username))) { /** this is the interesting part of this trick... **/ --- 533,540 ----- return(NULL); /* couldn't open it!! */ } + fprintf(filedesc, "Subject: %s\n", subject); + #ifdef SITE_HIDING if ((is_hidden_user = is_a_hidden_user(username))) { /** this is the interesting part of this trick... **/ *************** *** 568,575 hostname, username); # endif #endif - - fprintf(filedesc, "Subject: %s\n", subject); if (cc[0] != '\0') fprintf(filedesc, "Cc: %s\n", format_long(long_cc, strlen("Cc: "))); --- 570,575 ----- hostname, username); # endif #endif if (cc[0] != '\0') fprintf(filedesc, "Cc: %s\n", format_long(long_cc, strlen("Cc: "))); *** savecopy.c.B --- savecopy.c *************** *** 125,132 fprintf(save, "Date: %s\n", get_arpa_date()); ! fprintf(save,"To: %s\nSubject: %s\n", ! format_long(to,strlen("To: ")), subject); if (strlen(cc) > 0) fprintf(save,"Cc: %s\n", --- 125,132 ----- fprintf(save, "Date: %s\n", get_arpa_date()); ! fprintf(save,"Subject: %s\nTo: %s\n", ! subject, format_long(to,strlen("To: "))); if (strlen(cc) > 0) fprintf(save,"Cc: %s\n",