Re: makemap.8 patch

2018-11-21 Thread Gilles Chehade
On Tue, Nov 20, 2018 at 04:12:13PM -0600, Edgar Pettijohn wrote:
> 
> >
> > why db ?
> 
> Do you need makemap for file backend?
> 

oh gosh am I dumb.

your diff is ok, ignore me, will commit later today.

-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg



Re: makemap.8 patch

2018-11-20 Thread Edgar Pettijohn


On Nov 20, 2018 9:15 AM, Gilles Chehade  wrote:
>
> On Sun, Nov 18, 2018 at 08:32:47AM -0600, Edgar Pettijohn III wrote:
> > Use new syntax.
> > 
>
> Sorry was on the road.
>
> Comment inlined:
>
>
> > Index: makemap.8
> > 
> > ===
> > RCS file: /cvs/src/usr.sbin/smtpd/makemap.8,v
> > retrieving revision 1.29
> > diff -u -p -u -r1.29 makemap.8
> > --- makemap.8 ??13 Feb 2016 08:53:18 - ??1.29
> > +++ makemap.8 ??18 Nov 2018 14:29:33 -
> > @@ -105,8 +105,11 @@ In addition to adding an entry to the pr
> > ??one must add a filter rule that accepts mail for the domain
> > ??map, for example:
> > ??.Bd -literal -offset indent
> > -table domains "/etc/mail/domains"
> > -accept for domain  deliver to mbox
> > +table domains db:/etc/mail/domains.db
> > +
>
> why db ?

Do you need makemap for file backend?

>
> > +action "local" mbox
> > +
> > +match for domain  action "local"
> > ??.Ed
> > ??.Sh VIRTUAL DOMAINS
> > ??Virtual domains may also be kept in tables.
> > @@ -140,11 +143,13 @@ In addition to adding an entry to the vi
> > ??one must add a filter rule that accepts mail for virtual domains,
> > ??for example:
> > ??.Bd -literal -offset indent
> > -table vdomains "/etc/mail/vdomains"
> > -table vusers "/etc/mail/users"
> > +table vdomains db:/etc/mail/vdomains.db
> > +table vusers db:/etc/mail/users.db
> > +
>
> why db ?
>
> > +action "local" mbox virtual 
> > 
> > -accept for domain  virtual  deliver to mbox
> > -accept for domain example.org virtual  deliver to mbox
> > +match for domain  action "local"
> > +match for domain "example.org" action "local"
> > ??.Ed
> > ??.Sh FILES
> > ??.Bl -tag -width "/etc/mail/aliasesXXX" -compact
> > 
>
> Documentation should stick to the file backend which is the best one for
> the general case.
>
> The db backend is an extension of the file backend and unless you have a
> very specific use case, it brings no benefit whatsoever. It ISN'T faster
> than the file backend and unless you have a good rationale for using it,
> there's actually no good reason to.
>
> The only reason we still support it is because some corner cases do make
> sense, and even in those cases I'd argue there are better backends.
>
>
> -- 
> Gilles Chehade    @poolpOrg
>
> https://www.poolp.org tip me: https://paypal.me/poolpOrg



Re: makemap.8 patch

2018-11-20 Thread Gilles Chehade
On Sun, Nov 18, 2018 at 08:32:47AM -0600, Edgar Pettijohn III wrote:
> Use new syntax.
> 

Sorry was on the road.

Comment inlined:


> Index: makemap.8
> 
> ===
> RCS file: /cvs/src/usr.sbin/smtpd/makemap.8,v
> retrieving revision 1.29
> diff -u -p -u -r1.29 makemap.8
> --- makemap.8 ??13 Feb 2016 08:53:18 - ??1.29
> +++ makemap.8 ??18 Nov 2018 14:29:33 -
> @@ -105,8 +105,11 @@ In addition to adding an entry to the pr
> ??one must add a filter rule that accepts mail for the domain
> ??map, for example:
> ??.Bd -literal -offset indent
> -table domains "/etc/mail/domains"
> -accept for domain  deliver to mbox
> +table domains db:/etc/mail/domains.db
> +

why db ?

> +action "local" mbox
> +
> +match for domain  action "local"
> ??.Ed
> ??.Sh VIRTUAL DOMAINS
> ??Virtual domains may also be kept in tables.
> @@ -140,11 +143,13 @@ In addition to adding an entry to the vi
> ??one must add a filter rule that accepts mail for virtual domains,
> ??for example:
> ??.Bd -literal -offset indent
> -table vdomains "/etc/mail/vdomains"
> -table vusers "/etc/mail/users"
> +table vdomains db:/etc/mail/vdomains.db
> +table vusers db:/etc/mail/users.db
> +

why db ?

> +action "local" mbox virtual 
> 
> -accept for domain  virtual  deliver to mbox
> -accept for domain example.org virtual  deliver to mbox
> +match for domain  action "local"
> +match for domain "example.org" action "local"
> ??.Ed
> ??.Sh FILES
> ??.Bl -tag -width "/etc/mail/aliasesXXX" -compact
> 

Documentation should stick to the file backend which is the best one for
the general case.

The db backend is an extension of the file backend and unless you have a
very specific use case, it brings no benefit whatsoever. It ISN'T faster
than the file backend and unless you have a good rationale for using it,
there's actually no good reason to.

The only reason we still support it is because some corner cases do make
sense, and even in those cases I'd argue there are better backends.


-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg



makemap.8 patch

2018-11-18 Thread Edgar Pettijohn III

Use new syntax.


Index: makemap.8

===
RCS file: /cvs/src/usr.sbin/smtpd/makemap.8,v
retrieving revision 1.29
diff -u -p -u -r1.29 makemap.8
--- makemap.8    13 Feb 2016 08:53:18 -    1.29
+++ makemap.8    18 Nov 2018 14:29:33 -
@@ -105,8 +105,11 @@ In addition to adding an entry to the pr
 one must add a filter rule that accepts mail for the domain
 map, for example:
 .Bd -literal -offset indent
-table domains "/etc/mail/domains"
-accept for domain  deliver to mbox
+table domains db:/etc/mail/domains.db
+
+action "local" mbox
+
+match for domain  action "local"
 .Ed
 .Sh VIRTUAL DOMAINS
 Virtual domains may also be kept in tables.
@@ -140,11 +143,13 @@ In addition to adding an entry to the vi
 one must add a filter rule that accepts mail for virtual domains,
 for example:
 .Bd -literal -offset indent
-table vdomains "/etc/mail/vdomains"
-table vusers "/etc/mail/users"
+table vdomains db:/etc/mail/vdomains.db
+table vusers db:/etc/mail/users.db
+
+action "local" mbox virtual 

-accept for domain  virtual  deliver to mbox
-accept for domain example.org virtual  deliver to mbox
+match for domain  action "local"
+match for domain "example.org" action "local"
 .Ed
 .Sh FILES
 .Bl -tag -width "/etc/mail/aliasesXXX" -compact