Re: OpenSMTPD docs: makemap.8

2021-02-12 Thread Jason McIntyre
On Fri, Feb 12, 2021 at 03:19:53PM +, Larry Hynes wrote:
> Note: DNS is mentioned in this file as a way of accessing maps. Aside
> from this mention it appears to be undocumented.
> 
> Index: makemap.8
> ===
> RCS file: /cvs/src/usr.sbin/smtpd/makemap.8,v
> retrieving revision 1.30
> diff -u -p -r1.30 makemap.8
> --- makemap.8 25 Nov 2018 14:41:16 -  1.30
> +++ makemap.8 12 Feb 2021 15:17:42 -
> @@ -29,17 +29,18 @@
>  .Op Fl t Ar type
>  .Ar file
>  .Sh DESCRIPTION
> -Maps provide a generic interface for associating textual key to a value.
> -Such associations may be accessed through a plaintext file, database, or DNS.
> +Maps provide a generic interface for associating keys with values.

i simply added "a" before "textual key" here.

> +The resultant values may be accessed through a plain text file,
> +database, or DNS.
>  The format of these file types is described below.
>  .Nm
> -itself creates the database maps used by keyed map lookups specified in
> +creates the database maps used for lookups specified in
>  .Xr smtpd.conf 5 .
>  .Pp
>  .Nm
>  reads input from
>  .Ar file
> -and writes data to a file whose name is made by adding a
> +and, by default, writes data to a file which is named by adding a

i took the "which is named" part

>  .Dq .db
>  suffix to
>  .Ar file .
> @@ -76,7 +77,7 @@ Specify the format of the resulting map 
>  The default map format is suitable for storing simple, unstructured,
>  key-to-value string associations.
>  However, if the mapped value has special meaning,
> -as in the case of the virtual domains file,
> +as in the case of a virtual domains file,

taken

>  a suitable
>  .Ar type
>  must be provided.
> @@ -94,15 +95,14 @@ This format can be used for building pri
>  .It Fl U
>  Instead of generating a database map from text input,
>  dump the contents of a database map as text
> -with the key and value separated with a tab.
> +with the key and value separated by a tab.
>  .El
>  .Sh PRIMARY DOMAINS
> -Primary domains can be kept in tables.
>  To create a primary domain table, add each primary domain on a
>  single line by itself.
>  .Pp
>  In addition to adding an entry to the primary domain map,
> -one must add a filter rule that accepts mail for the domain
> +one must add a match directive that accepts mail for the domain
>  map, for example:
>  .Bd -literal -offset indent
>  table domains db:/etc/mail/domains.db
> @@ -112,11 +112,10 @@ action "local" mbox
>  match for domain  action "local"
>  .Ed
>  .Sh VIRTUAL DOMAINS
> -Virtual domains may also be kept in tables.
>  To create a virtual domain table, add each virtual domain on a
>  single line by itself.
>  .Pp
> -Virtual domains expect a mapping of virtual users to real users
> +Virtual domains expect a mapping of virtual to real users
>  in order to determine if a recipient is accepted or not.
>  The mapping format is an extension to
>  .Xr aliases 5 ,
> @@ -130,17 +129,17 @@ to provide a catch-all for the specified
>  .Dq @
>  to provide a global catch-all for all domains.
>  .Xr smtpd 8
> -will perform the lookups in that specific order.
> +will perform lookups in that order.
>  .Pp
> -To create single virtual address, add
> +To create a single virtual address, add
>  .Dq u...@example.com user
> -to the users map.
> -To handle all mail destined to any user at example.com, add
> +to the user map.
> +To handle all mail addressed to any user at example.com, add
>  .Dq @example.com user
>  to the virtual map.
>  .Pp
>  In addition to adding an entry to the virtual map,
> -one must add a filter rule that accepts mail for virtual domains,
> +one must add a match directive that accepts mail for virtual domains,
>  for example:
>  .Bd -literal -offset indent
>  table vdomains db:/etc/mail/vdomains.db
> 

any changes not noted above were not committed (on the basis that i
cannot discern any clear improvement).

jmc



OpenSMTPD docs: makemap.8

2021-02-12 Thread Larry Hynes
Note: DNS is mentioned in this file as a way of accessing maps. Aside
from this mention it appears to be undocumented.

Index: makemap.8
===
RCS file: /cvs/src/usr.sbin/smtpd/makemap.8,v
retrieving revision 1.30
diff -u -p -r1.30 makemap.8
--- makemap.8   25 Nov 2018 14:41:16 -  1.30
+++ makemap.8   12 Feb 2021 15:17:42 -
@@ -29,17 +29,18 @@
 .Op Fl t Ar type
 .Ar file
 .Sh DESCRIPTION
-Maps provide a generic interface for associating textual key to a value.
-Such associations may be accessed through a plaintext file, database, or DNS.
+Maps provide a generic interface for associating keys with values.
+The resultant values may be accessed through a plain text file,
+database, or DNS.
 The format of these file types is described below.
 .Nm
-itself creates the database maps used by keyed map lookups specified in
+creates the database maps used for lookups specified in
 .Xr smtpd.conf 5 .
 .Pp
 .Nm
 reads input from
 .Ar file
-and writes data to a file whose name is made by adding a
+and, by default, writes data to a file which is named by adding a
 .Dq .db
 suffix to
 .Ar file .
@@ -76,7 +77,7 @@ Specify the format of the resulting map 
 The default map format is suitable for storing simple, unstructured,
 key-to-value string associations.
 However, if the mapped value has special meaning,
-as in the case of the virtual domains file,
+as in the case of a virtual domains file,
 a suitable
 .Ar type
 must be provided.
@@ -94,15 +95,14 @@ This format can be used for building pri
 .It Fl U
 Instead of generating a database map from text input,
 dump the contents of a database map as text
-with the key and value separated with a tab.
+with the key and value separated by a tab.
 .El
 .Sh PRIMARY DOMAINS
-Primary domains can be kept in tables.
 To create a primary domain table, add each primary domain on a
 single line by itself.
 .Pp
 In addition to adding an entry to the primary domain map,
-one must add a filter rule that accepts mail for the domain
+one must add a match directive that accepts mail for the domain
 map, for example:
 .Bd -literal -offset indent
 table domains db:/etc/mail/domains.db
@@ -112,11 +112,10 @@ action "local" mbox
 match for domain  action "local"
 .Ed
 .Sh VIRTUAL DOMAINS
-Virtual domains may also be kept in tables.
 To create a virtual domain table, add each virtual domain on a
 single line by itself.
 .Pp
-Virtual domains expect a mapping of virtual users to real users
+Virtual domains expect a mapping of virtual to real users
 in order to determine if a recipient is accepted or not.
 The mapping format is an extension to
 .Xr aliases 5 ,
@@ -130,17 +129,17 @@ to provide a catch-all for the specified
 .Dq @
 to provide a global catch-all for all domains.
 .Xr smtpd 8
-will perform the lookups in that specific order.
+will perform lookups in that order.
 .Pp
-To create single virtual address, add
+To create a single virtual address, add
 .Dq u...@example.com user
-to the users map.
-To handle all mail destined to any user at example.com, add
+to the user map.
+To handle all mail addressed to any user at example.com, add
 .Dq @example.com user
 to the virtual map.
 .Pp
 In addition to adding an entry to the virtual map,
-one must add a filter rule that accepts mail for virtual domains,
+one must add a match directive that accepts mail for virtual domains,
 for example:
 .Bd -literal -offset indent
 table vdomains db:/etc/mail/vdomains.db