Index | Thread | Search

From:
Christian Schulte <schulte.it@gmail.com>
Subject:
Re: Adding Message-ID to mail(1)
To:
tech@openbsd.org
Date:
Fri, 30 Aug 2024 02:23:03 +0200

Download raw body.

Thread
On 29.08.24 08:56, Walter Alejandro Iglesias wrote:
> On Thu, Aug 29, 2024 at 12:35:50AM +0200, Christian Schulte wrote:
>> Says the man continuously sending mails to this list without any progress.
> 
> On the contrary, I did not stop progressing and taking advantage of all
> the feeback.  Even yours.  Thank you for your help!
> 

For what it's worth. There is a function

int
getmailname(char *hostname, size_t len)

in src/usr.sbin/smtpd/util.c[1] which seems to do what you are looking
for. It will canonicalize the hostname returned by gethostname(3) only
if the domain part is missing (no dot) and does not iterate over the
resolution result returned by getaddrinfo(3). It takes the hostname from
/etc/mail/mailname verbatim, without performing any canonicalization
whatsoever.

Then there is

-a file
    Attach the given file to the message.[2]

and

-a
    Specify additional header fields on the command line...[3]


Good luck.


[1] <https://cvsweb.openbsd.org/src/usr.sbin/smtpd/util.c>
[2] <https://linux.die.net/man/1/mail>
[3] <https://manpages.debian.org/stretch/bsd-mailx/mail.1.en.html>

-- 
Christian