Re: Inject Date and Message-Id

2024-04-17 Thread Kirill A . Korinsky
Hi,

On Wed, 17 Apr 2024 13:18:47 +0200,
Philipp wrote:
> 
> There was a bug in the code which mixed the byteorder of the port. This
> is fixed in 7.4. So an update might help.
> 

Confirmed, that upgrade to OpenBSD 7.5 fixes an issue.

-- 
wbr, Kirill



Re: Inject Date and Message-Id

2024-04-17 Thread Philipp
Hi

[2024-04-17 11:34] Kirill A. Korinsky 
> On Wed, 17 Apr 2024 09:48:14 +0200,
> Kirill A. Korinsky wrote:
> > 
> > As simpler solution I see the behaviour for OpenSMTPd to inject MessageId
> > (when it missed) or date.
> > 
> > Or it's bad idea?
> > 
>
> After reading the code I see that it should insert Date and MessageId if
> client is connected to 587 port[1], in my case it uses 587 port and doesn't
> inserted Message-Id nor Date header.

There was a bug in the code which mixed the byteorder of the port. This
is fixed in 7.4. So an update might help.

Philipp



Re: Inject Date and Message-Id

2024-04-17 Thread Kirill A . Korinsky
On Wed, 17 Apr 2024 09:48:14 +0200,
Kirill A. Korinsky wrote:
> 
> As simpler solution I see the behaviour for OpenSMTPd to inject MessageId
> (when it missed) or date.
> 
> Or it's bad idea?
> 

After reading the code I see that it should insert Date and MessageId if
client is connected to 587 port[1], in my case it uses 587 port and doesn't
inserted Message-Id nor Date header.

The listers looks like:

  listen on egress port smtps \
 smtps pki mx.catap.net auth  mask-src filter dkimsign
  listen on egress port submission \
 tls-require pki mx.catap.net auth  mask-src filter 
dkimsign

and that it uses 587 was just confirmed by tcpdump.

Footnotes:
[1]  
https://github.com/OpenSMTPD/OpenSMTPD/blob/v6.8.0p2/usr.sbin/smtpd/smtp_session.c#L2739-L2757

-- 
wbr, Kirill