Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!ogicse!schaefer From: schaefer@ogicse.ogi.edu (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: my_hdr question Message-ID: <11333@ogicse.ogi.edu> Date: 14 Aug 90 05:33:39 GMT References: <11154@cs.utexas.edu> Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 23 In article <11154@cs.utexas.edu> fletcher@cs.utexas.edu (Fletcher Mattox) writes: } If I want my own From: header [with my_hdr] } then mush 7.1.2 puts no From: in my $record. Though it happily } sends the custom From:, as expected, to the MTA. Why is that? Well, because it's a bug, obviously. :-} It works fine if you use the edit_hdrs facility ... or if you have a PICKY_MAILER .... } The code in add_headers() seems to intentionally wipe out the } buffer after writing to the MTA with ... } } if (own_from) } (void) fputs(own_from, files[i]), *own_from = 0; } else } (void) fputs(From_buf, files[i]); See the WARNING comment higher up; own_from makes temporary use of the buf[] array to store the string, and buf[0] == 0 is tested later on for an edit_hdrs-specific purpose. The clobbering of buf[0] via *own_from is happening a little too eagerly; it should happen after the for (i = ...) loop, not inside it. -- Bart Schaefer schaefer@cse.ogi.edu