From c14a3ab8e1b38b8609b48cb981b758ce7b6ebfa4 Mon Sep 17 00:00:00 2001 From: op Date: Sun, 3 Dec 2023 11:52:16 +0000 Subject: [PATCH] add the `no-dsn' option to `listen on socket' too ok millert@ --- usr.sbin/smtpd/parse.y | 10 +++++++++- usr.sbin/smtpd/smtpd.conf.5 | 6 ++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index 38dea535596..a8744c05ae7 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.295 2023/12/03 11:50:50 op Exp $ */ +/* $OpenBSD: parse.y,v 1.296 2023/12/03 11:52:16 op Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -2149,6 +2149,14 @@ opt_sock_listen : FILTER STRING { YYERROR; } } + | NO_DSN { + if (listen_opts.options & LO_NODSN) { + yyerror("no-dsn already specified"); + YYERROR; + } + listen_opts.options |= LO_NODSN; + listen_opts.flags &= ~F_EXT_DSN; + } | TAG STRING { if (listen_opts.options & LO_TAG) { yyerror("tag already specified"); diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5 index a4324e94b79..9f2a5f5e348 100644 --- a/usr.sbin/smtpd/smtpd.conf.5 +++ b/usr.sbin/smtpd/smtpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: smtpd.conf.5,v 1.265 2023/05/19 15:18:06 op Exp $ +.\" $OpenBSD: smtpd.conf.5,v 1.266 2023/12/03 11:52:16 op Exp $ .\" .\" Copyright (c) 2008 Janne Johansson .\" Copyright (c) 2009 Jacek Masiulaniec @@ -17,7 +17,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" -.Dd $Mdocdate: May 19 2023 $ +.Dd $Mdocdate: December 3 2023 $ .Dt SMTPD.CONF 5 .Os .Sh NAME @@ -565,6 +565,8 @@ Omit the part when prepending .Dq Received headers. +.It Cm no-dsn +Disable the DSN (Delivery Status Notification) extension. .It Cm tag Ar tag Clients connecting to the listener are tagged with the given .Ar tag . -- 2.20.1