From: millert Date: Mon, 9 Oct 2023 20:55:32 +0000 (+0000) Subject: Add Message-Id as needed for messages received on the submission port. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ab096723d8beb5f3ddcfbbb05ad68c209414c4ba;p=openbsd Add Message-Id as needed for messages received on the submission port. Since listener->port is in network byte order we need to compare against htons(587). The fix for this got dropped in the rewrite in revision 1.335. --- diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 470b86b48d5..ca21c5b86d4 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.435 2023/06/23 18:32:28 op Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.436 2023/10/09 20:55:32 millert Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -2624,7 +2624,7 @@ smtp_tx_dataline(struct smtp_tx *tx, const char *line) case RFC5322_END_OF_HEADERS: if (tx->session->listener->local || - tx->session->listener->port == 587) { + tx->session->listener->port == htons(587)) { if (!tx->has_date) { log_debug("debug: %p: adding Date", tx);