Index | Thread | Search

From:
gilles@poolp.org
Subject:
Re: smtpd(8) should add missing date and message id headers also on port 465
To:
"Christian Schulte" <schulte.it@gmail.com>, tech@openbsd.org
Date:
Sun, 08 Sep 2024 07:30:47 +0000

Download raw body.

Thread
September 8, 2024 8:55 AM, "Christian Schulte" <schulte.it@gmail.com> wrote:

> You are talking about something like this, right? Looks reasonable to me.
> No hurry.
> 

Yes, I was thinking about something along those lines.

Maybe introduce SF_SUBMISSION and set it if SF_AUTHENTICATED or listener->local,
and check if F_SUBMISSION instead. This would be more straightforward to read in
this switch case but it would also make it possible to later plug this flag as a
match criteria and write rules that only apply to submitted messages.


> Sorry, if this mail does not show up correctly in the thread. I cannot get mutt
> to authenticate to the gmail account. So I really used vi and sendmail -t.
> 

np


> Index: usr.sbin/smtpd/smtp_session.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/smtpd/smtp_session.c,v
> retrieving revision 1.442
> diff -u -p -u -r1.442 smtp_session.c
> --- usr.sbin/smtpd/smtp_session.c 20 Mar 2024 17:52:43 -0000 1.442
> +++ usr.sbin/smtpd/smtp_session.c 8 Sep 2024 06:48:13 -0000
> @@ -2625,7 +2625,7 @@ smtp_tx_dataline(struct smtp_tx *tx, con
> 
> case RFC5322_END_OF_HEADERS:
> if (tx->session->listener->local ||
> - tx->session->listener->port == htons(587)) {
> + tx->session->flags & SF_AUTHENTICATED) {
> 
> if (!tx->has_date) {
> log_debug("debug: %p: adding Date", tx);