Index | Thread | Search

From:
Jason McIntyre <jmc@kerhand.co.uk>
Subject:
Re: [patch] smtpd-filters.7 - Few fixes in FILTER REQUESTS
To:
tech@openbsd.org
Date:
Thu, 30 Jan 2025 19:53:20 +0000

Download raw body.

Thread
On Thu, Jan 30, 2025 at 11:35:35AM -0800, patrick keshishian wrote:
> > > > @@ -550,9 +550,19 @@ filter-dataline|7641df9771b4ed00|1ef1c20
> > > >  .Pp
> > > >  The list of events and event-specific parameters for smtp-in are as follows:
> > > >  .Bl -tag -width Ds
> > > > -.It Ic connect : Ar rdns fcrdns src dest
> > > > +.It Ic connect : Ar rdns src
> > > >  This request is emitted after connection,
> > > >  before the banner is displayed.
> > > > +.Pp
> > > > +.Ar src
> > > > +contains either the IP address of the source address,
> > > > +in the format
> > > > +.Dq a.b.c.d
> > > > +in case of IPv4, or
> > > > +.Dq [x:x:x:x:x:x:x:x]
> > > > +in case of IPv6, or
> > > > +.Dq local
> > > > +in case of UNIX socket.
> > > >  .It Ic helo : Ar identity
> > > >  This request is emitted after the client has emitted
> > > >  .Dq HELO .
> > > > 
> > 
> > i think this is a bit wordy. i think you could just say
> > 
> > 	contains either the IP address of the source
> > 	(a.b.c.d for IPv4 or [x:..] for IPv6)
> > 	or
> > 	.Dq local
> > 	(for UNIX sockets).
> > 
> > maybe you don;t even have to mention the formats for v4/6 if it's clear
> > enough.
> 
> Thanks for the feedback.
> Updated diff (against HEAD) inline at the end.
> 
> --patrick
> 
> 
> 
> Index: smtpd-filters.7
> ===================================================================
> RCS file: /cvs/obsd/src/usr.sbin/smtpd/smtpd-filters.7,v
> retrieving revision 1.13
> diff -u -p -u -p -r1.13 smtpd-filters.7
> --- smtpd-filters.7	5 Nov 2024 19:36:53 -0000	1.13
> +++ smtpd-filters.7	30 Jan 2025 19:31:56 -0000
> @@ -465,7 +465,7 @@ Fields are separated by the
>  .Dq |
>  character.
>  .Bd -literal -offset indent
> -filter|0.7|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|199.185.178.25
>  .Ed
>  .Pp
>  The format consists of a protocol prefix containing the stream,
> @@ -484,7 +484,7 @@ filter request,
>  also separated by
>  .Dq | :
>  .Bd -literal -offset indent
> -mail.openbsd.org|pass|199.185.178.25:33174|45.77.67.80:25
> +mail.openbsd.org|199.185.178.25
>  .Ed
>  .Pp
>  Unlike with report events,
> @@ -553,9 +553,16 @@ filter-dataline|7641df9771b4ed00|1ef1c20
>  .Pp
>  The list of events and event-specific parameters for smtp-in are as follows:
>  .Bl -tag -width Ds
> -.It Ic connect : Ar rdns fcrdns src dest
> +.It Ic connect : Ar rdns src
>  This request is emitted after connection,
>  before the banner is displayed.
> +.Pp
> +.Ar src
> +contains either the IP address of the source
> +(a.b.c.d for IPv4 or [x:..] IPv6)
> +or
> +.Dq local
> +(for UNIX sockets).
>  .It Ic helo : Ar identity
>  This request is emitted after the client has emitted
>  .Dq HELO .
> 

that is fine by me but i hadn;t meant you to shorten to [x:..] - i just
didn't bother to type it in full. so i think you should use the correct
notation (as you had originally).

sorry for the confusion!

jmc