On Mon, Jul 22, 2019 at 05:05:01PM -0400, Kurt Mosiejczuk wrote:
> This is a diff for that changes the example smtpd.conf and smtpd.conf.5
> so that it no longer uses words that are parts of the configuration
> syntax as labels for actions.  A large chunk of my delay to a release
> with the new smtpd.conf configuration syntax was my confusion with the
> examples. Even writing this diff I realized that the quotes were only 
> necessary in the examples because configuration grammar was being 
> reused as labels.
> 

I'll let ingo and jmc comment on this, I think the rationale for
using the quotes and the reserved words was precisely to show we
should use the quotes at these places and that reserved words in
quotes were acceptable.

To be honest, ever since we made these examples, no one has ever
mailed me with a broken config due to a reserved keyword whereas
it used to be the case every now and then before.


> Index: etc/mail/smtpd.conf
> ===================================================================
> RCS file: /cvs/src/etc/mail/smtpd.conf,v
> retrieving revision 1.11
> diff -u -p -r1.11 smtpd.conf
> --- etc/mail/smtpd.conf       4 Jun 2018 21:10:58 -0000       1.11
> +++ etc/mail/smtpd.conf       22 Jul 2019 20:58:24 -0000
> @@ -9,11 +9,11 @@ table aliases file:/etc/mail/aliases
>  #
>  listen on lo0
>  
> -action "local" mbox alias <aliases>
> -action "relay" relay
> +action local-mail mbox alias <aliases>
> +action inet-mail relay
>  
>  # Uncomment the following to accept external mail for domain "example.org"
>  #
> -# match from any for domain "example.org" action "local"
> -match for local action "local"
> -match for any action "relay"
> +# match from any for domain "example.org" action local-mail
> +match for local action local-mail
> +match for any action inet-mail
> Index: usr.sbin/smtpd/smtpd.conf.5
> ===================================================================
> RCS file: /cvs/src/usr.sbin/smtpd/smtpd.conf.5,v
> retrieving revision 1.210
> diff -u -p -r1.210 smtpd.conf.5
> --- usr.sbin/smtpd/smtpd.conf.5       22 Dec 2018 08:54:02 -0000      1.210
> +++ usr.sbin/smtpd/smtpd.conf.5       22 Jul 2019 20:58:24 -0000
> @@ -871,12 +871,12 @@ table secrets file:/etc/mail/secrets
>  
>  listen on lo0
>  
> -action "local" mbox alias <aliases>
> -action "relay" relay host smtp+tls://b...@smtp.example.com \e
> +action local-mail mbox alias <aliases>
> +action inet-mail relay host smtp+tls://b...@smtp.example.com \e
>       auth <secrets>
>  
> -match for local action "local"
> -match for any action "relay"
> +match for local action local-mail
> +match for any action inet-mail
>  .Ed
>  .Pp
>  In this second example,
> @@ -908,12 +908,12 @@ listen on egress tls pki mail.example.co
>  
>  action mda_with_aliases mda "/path/to/mda \-f \-" alias <aliases>
>  action mda_without_aliases mda "/path/to/mda \-f \-"
> -action "relay" relay
> +action inet-mail relay
>  
>  match for local action mda_with_aliases
>  match from any for domain example.com action mda_without_aliases
> -match for any action "relay"
> -match auth from any for any action "relay"
> +match for any action inet-mail
> +match auth from any for any action inet-mail
>  .Ed
>  .Pp
>  For sites that wish to sign messages using DKIM, the
> @@ -929,12 +929,12 @@ table aliases file:/etc/mail/aliases
>  listen on lo0
>  listen on lo0 port 10028 tag DKIM
>  
> -action "mbox" mbox alias <aliases>
> -action "relay" relay
> +action local-mbox mbox alias <aliases>
> +action inet-mail relay
>  action relay_dkim relay host smtp://127.0.0.1:10027
>  
> -match for local action "mbox"
> -match tag DKIM for any action "relay"
> +match for local action local-mbox
> +match tag DKIM for any action inet-mail
>  match for any action relay_dkim
>  .Ed
>  .Pp
> @@ -952,14 +952,14 @@ table other-relays file:/etc/mail/other-
>  listen on lo0
>  listen on egress
>  
> -action "mbox" mbox alias <aliases>
> -action "relay" relay
> +action local-mbox mbox alias <aliases>
> +action inet-mail relay
>  
> -match for local action "mbox"
> -match for any action "relay"
> +match for local action local-mbox
> +match for any action inet-mail
>  match !from src <other-relays> mail\-from "@example.com" for any \e
>        reject
> -match from any for domain example.com action "mbox"
> +match from any for domain example.com action local-mbox
>  .Ed
>  .Sh SEE ALSO
>  .Xr mailer.conf 5 ,
> 

-- 
Gilles Chehade                                                 @poolpOrg

https://www.poolp.org            patreon: https://www.patreon.com/gilles

Reply via email to