On 2023/10/09 14:55, Todd C. Miller wrote:
> CVSROOT:      /cvs
> Module name:  src
> Changes by:   mill...@cvs.openbsd.org 2023/10/09 14:55:33
> 
> Modified files:
>       usr.sbin/smtpd : smtp_session.c 
> 
> Log message:
> 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.

Presumably 465 should be treated the same, though the hardcoded ports
don't feel entirely right here - this is presumably something that would
want adding for any connection which is allowed to relay ..

Index: smtp_session.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/smtp_session.c,v
retrieving revision 1.436
diff -u -p -r1.436 smtp_session.c
--- smtp_session.c      9 Oct 2023 20:55:32 -0000       1.436
+++ smtp_session.c      10 Oct 2023 09:41:05 -0000
@@ -2624,6 +2624,7 @@ smtp_tx_dataline(struct smtp_tx *tx, con
 
                case RFC5322_END_OF_HEADERS:
                        if (tx->session->listener->local ||
+                           tx->session->listener->port == htons(465) ||
                            tx->session->listener->port == htons(587)) {
 
                                if (!tx->has_date) {

Reply via email to