Index | Thread | Search

From:
Walter Alejandro Iglesias <wai@roquesor.com>
Subject:
Re: Adding Message-ID to mail(1)
To:
tech@openbsd.org
Date:
Mon, 26 Aug 2024 11:38:25 +0200

Download raw body.

Thread
On Mon, Aug 26, 2024 at 11:08:52AM +0200, Walter Alejandro Iglesias wrote:
> I don't remember if GNU mailutils version is able to read headers
> included in the same file you feed with the body (perhaps Mutt?)  In
> this case you should be able to use a loop like this:
> 
> for i in `cat /etc/lots_of_recipients`; do
> 	mail $i < body_including_headers.txt
> done
> 
> But, so far, with the OpenBSD version of mail you can't do that.  You
> cannot pass other headers than From, To, Cc, Bcc and Subject, and only
> in the ways explained in the man page.
> 

You can do the following with the bsd-mailx version you find in Debian
as a package:

  for i in `cat /etc/lots_of_recipients`; do
 	mail -a "Message-ID: <string>" $i < body.txt
  done

It would be ideal to add such option to openbsd mail, in fact that was
my first idea years ago.  I opted for a simpler solution according to
the approach of this project.