-.\" $OpenBSD: smtpd-filters.7,v 1.10 2023/07/07 14:52:00 op Exp $
+.\" $OpenBSD: smtpd-filters.7,v 1.11 2024/05/14 13:32:09 op Exp $
.\"
.\" Copyright (c) 2008 Janne Johansson <jj@openbsd.org>
.\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\"
-.Dd $Mdocdate: July 7 2023 $
+.Dd $Mdocdate: May 14 2024 $
.Dt SMTPD-FILTERS 7
.Os
.Sh NAME
.Nm
with general configuration information in the form of key-value lines:
.Bd -literal -offset indent
-config|smtpd-version|6.6.1
+config|smtpd-version|7.5.0
config|smtp-session-timeout|300
config|subsystem|smtp-in
config|ready
.Nm
to respond or not depending on the stream:
.Bd -literal -offset indent
-report|0.5|1576146008.006099|smtp-in|link-connect|7641df9771b4ed00|mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
-report|0.5|1576147242.200225|smtp-in|link-connect|7641dfb3798eb5bf|mail.openbsd.org|pass|199.185.178.25:31205|45.77.67.80:25
-report|0.5|1576148447.982572|smtp-in|link-connect|7641dfc063102cbd|mail.openbsd.org|pass|199.185.178.25:24786|45.77.67.80:25
+report|0.7|1576146008.006099|smtp-in|link-connect|7641df9771b4ed00|mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
+report|0.7|1576147242.200225|smtp-in|link-connect|7641dfb3798eb5bf|mail.openbsd.org|pass|199.185.178.25:31205|45.77.67.80:25
+report|0.7|1576148447.982572|smtp-in|link-connect|7641dfc063102cbd|mail.openbsd.org|pass|199.185.178.25:24786|45.77.67.80:25
.Ed
.Pp
The character
.Pp
There are currently three keys:
.Bd -literal -offset indent
-config|smtpd-version|6.6.1
+config|smtpd-version|7.5.0
config|smtp-session-timeout|300
config|subsystem|smtp-in
.Ed
.Xr smtpd 8
as a single line similar to the one below:
.Bd -literal -offset indent
-report|0.5|1576146008.006099|smtp-in|link-connect|7641df9771b4ed00|mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
+report|0.7|1576146008.006099|smtp-in|link-connect|7641df9771b4ed00|mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
.Ed
.Pp
The format consists of a protocol prefix containing the stream,
separated by
.Dq | :
.Bd -literal -offset indent
-report|0.5|1576146008.006099|smtp-in|link-connect|7641df9771b4ed00
+report|0.7|1576146008.006099|smtp-in|link-connect|7641df9771b4ed00
.Ed
.Pp
It is followed by a suffix containing the event-specific parameters,
.Dq |
character.
.Bd -literal -offset indent
-filter|0.5|1576146008.006099|smtp-in|connect|7641df9771b4ed00|1ef1c203cc576e5d|mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
+filter|0.7|1576146008.006099|smtp-in|connect|7641df9771b4ed00|1ef1c203cc576e5d|mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
.Ed
.Pp
The format consists of a protocol prefix containing the stream,
the unique session identifier and an opaque token that the filter
should provide in its response:
.Bd -literal -offset indent
-filter|0.5|1576146008.006099|smtp-in|connect|7641df9771b4ed00|1ef1c203cc576e5d
+filter|0.7|1576146008.006099|smtp-in|connect|7641df9771b4ed00|1ef1c203cc576e5d
.Ed
.Pp
It is followed by a suffix containing the phase-specific parameters of the
are fed a stream of lines corresponding to the message to filter,
terminated by a single dot:
.Bd -literal -offset indent
-filter|0.5|1576146008.006099|smtp-in|data-line|7641df9771b4ed00|1ef1c203cc576e5d|line 1
-filter|0.5|1576146008.006103|smtp-in|data-line|7641df9771b4ed00|1ef1c203cc576e5d|line 2
-filter|0.5|1576146008.006105|smtp-in|data-line|7641df9771b4ed00|1ef1c203cc576e5d|.
+filter|0.7|1576146008.006099|smtp-in|data-line|7641df9771b4ed00|1ef1c203cc576e5d|line 1
+filter|0.7|1576146008.006103|smtp-in|data-line|7641df9771b4ed00|1ef1c203cc576e5d|line 2
+filter|0.7|1576146008.006105|smtp-in|data-line|7641df9771b4ed00|1ef1c203cc576e5d|.
.Ed
.Pp
They are expected to return an output stream