On Sat 10 Dec 2022 at 08:24:05 (+0200), Teemu Likonen wrote: > * 2022-12-09 20:39:34-0600, Greg Marks wrote: > > > > I occasionally send e-mail from the command line via Postfix, using a > > script containing the command > > > > /usr/sbin/sendmail -oi -f <myaddress> -t <myaddress> < file
> > Is there a way to tell the Postfix sendmail command not to alter any > > such lines ["From" lines] in the body of the message? Not knowing what prompts these occasions, it difficult to advise. If the precise format is unimportant, then passing <file> through a filter to eleminate any occurrences would be one method: it could be the first step in a script that calls whatever method you're using to sign the email. If format precision matters, see the next quoted paragraph. As was pointed out, it's only "From " at the start that matters. > Probably Mutt email client can automatically do all the encoding and > pass the fully compliant message to sendmail. Mutt can be used in > command line. I didn't test it because I don't have any sendmails > installed. A lower level option for constructing valid emails is > "mime-construct". From this line, you should get confirmation of mutt's behaviour. But note that you have to turn it on with set encode_from in its muttrc. > From letters are in the beginning of this line because I want to test my > own message and email client: the file that is saved locally in my > computer and the file which comes through the mailing list. FWIW your client appears to encode the space, whereas mutt encodes the F. And mutt is cautious, as it ought to be, and encodes whether or not the From follows a blank line. Cheers, David.