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.
-/* $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 <gilles@poolp.org>
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);