Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Gilles Chehade
On Wed, May 31, 2017 at 09:53:38AM -0500, Jimmy Hess wrote:
> On Wed, May 31, 2017 at 6:34 AM, Gilles Chehade  wrote:
> 
> > It is not that simple because newaliases works when you have one aliases
> > database (e.g. /etc/mail/aliases). This is the case on the default setup
> > but smtpd supports per-rule aliases mappings and for example the MX that
> > I run for poolp.org
> 
> Sounds like  newaliases   should check the config for the existence of
> multiple aliases
> mappings,   And either  enumerate and make sure all of them get refreshed,  Or
> return an error listing out  possible alias mappings to refresh and
> ask you to pick
> 
> newaliases (-a | )
> 

I'm not opposed to adding parameter to newaliases
I'm very opposed to implicitely refreshing everything automatically.


> Either way,  requiring some wordy incantation such as"smtpctl
> update table aliases"
> to get what newaliases did for standard configurations is not very cool.
>

technically, this can be fixed with mailwrapper(8) which is why we did
not bother with a shortcut directly in the code, we should probably do
a mailwrapper shortcut out of the box even if it doesn't work on other
setups.


> Or for non-standard  configurations  that break newaliases  list as a
> documented caveat
> of using the options for custom tables.
> 
> --
> -JH

-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg



Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Jimmy Hess
On Wed, May 31, 2017 at 6:34 AM, Gilles Chehade  wrote:

> It is not that simple because newaliases works when you have one aliases
> database (e.g. /etc/mail/aliases). This is the case on the default setup
> but smtpd supports per-rule aliases mappings and for example the MX that
> I run for poolp.org

Sounds like  newaliases   should check the config for the existence of
multiple aliases
mappings,   And either  enumerate and make sure all of them get refreshed,  Or
return an error listing out  possible alias mappings to refresh and
ask you to pick

newaliases (-a | )

Either way,  requiring some wordy incantation such as"smtpctl
update table aliases"
to get what newaliases did for standard configurations is not very cool.

Or for non-standard  configurations  that break newaliases  list as a
documented caveat
of using the options for custom tables.

--
-JH



Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Gilles Chehade
On Wed, May 31, 2017 at 11:59:08AM +0100, Stuart Henderson wrote:
> On 2017/05/31 11:10, Jason McIntyre wrote:
> > On Wed, May 31, 2017 at 11:49:18AM +0200, Antoine Jacoutot wrote:
> > > On May 31, 2017 11:35:28 AM GMT+02:00, Consus  wrote:
> > > >OpenBSD defaults to file table now so there is no need in running
> > > >newaliases(8).
> > > >---
> > > > etc/mail/aliases | 8 ++--
> > > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > > >
> > > >diff --git a/etc/mail/aliases b/etc/mail/aliases
> > > >index c1ac04b5a81..045b2b2a456 100644
> > > >--- a/etc/mail/aliases
> > > >+++ b/etc/mail/aliases
> > > >@@ -1,12 +1,8 @@
> > > > #
> > > > #   $OpenBSD: aliases,v 1.64 2017/03/18 21:18:01 florian Exp $
> > > > #
> > > >-#  Aliases in this file will NOT be expanded in the header from
> > > >-#  Mail, but WILL be visible over networks or from
> > > >/usr/libexec/mail.local.
> > > >-#
> > > >-#   >>  The program "newaliases" must be run after
> > > >-#   >> NOTE >>  this file is updated for any changes to
> > > >-#   >>  show through to smtpd.
> > > >+#  Aliases in this file will NOT be expanded in the header from Mail,
> > > >but WILL
> > > >+#  be visible over networks or from /usr/libexec/mail.local.
> > > > #
> > > > 
> > > > # Basic system aliases -- these MUST be present
> > > >-- 
> > > >2.13.0
> > > 
> > > I proposed the same a while ago but people preferred to keep it in regard 
> > > to other MTA. Maybe it's time to revisit ?
> > > 
> > > 
> > 
> > well what's there now is incorrect, so i think something needs to
> > happen. even if we just prefix the text with "For databases" or
> > something.
> 
> But you need "smtpctl update table aliases" instead don't you? (At least
> that is how I read the manual).
> 
> (It would seem useful if "newaliases" did whatever is necessary for the
> table type you have in use so you don't need to think about it and the
> documentation can be simple..)
> 

It is not that simple because newaliases works when you have one aliases
database (e.g. /etc/mail/aliases). This is the case on the default setup
but smtpd supports per-rule aliases mappings and for example the MX that
I run for poolp.org and opensmtpd.org has two different sets of aliases,
one for each domain, and now newaliases can't work anymore.

We can hack it so it works in some cases but it will never be able to do
the work correctly for non-default configurations and we will still have
to provide and document the smtpctl command.

-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg



Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Stuart Henderson
On 2017/05/31 11:10, Jason McIntyre wrote:
> On Wed, May 31, 2017 at 11:49:18AM +0200, Antoine Jacoutot wrote:
> > On May 31, 2017 11:35:28 AM GMT+02:00, Consus  wrote:
> > >OpenBSD defaults to file table now so there is no need in running
> > >newaliases(8).
> > >---
> > > etc/mail/aliases | 8 ++--
> > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > >
> > >diff --git a/etc/mail/aliases b/etc/mail/aliases
> > >index c1ac04b5a81..045b2b2a456 100644
> > >--- a/etc/mail/aliases
> > >+++ b/etc/mail/aliases
> > >@@ -1,12 +1,8 @@
> > > #
> > > # $OpenBSD: aliases,v 1.64 2017/03/18 21:18:01 florian Exp $
> > > #
> > >-#  Aliases in this file will NOT be expanded in the header from
> > >-#  Mail, but WILL be visible over networks or from
> > >/usr/libexec/mail.local.
> > >-#
> > >-# >>  The program "newaliases" must be run after
> > >-# >> NOTE >>  this file is updated for any changes to
> > >-# >>  show through to smtpd.
> > >+#  Aliases in this file will NOT be expanded in the header from Mail,
> > >but WILL
> > >+#  be visible over networks or from /usr/libexec/mail.local.
> > > #
> > > 
> > > # Basic system aliases -- these MUST be present
> > >-- 
> > >2.13.0
> > 
> > I proposed the same a while ago but people preferred to keep it in regard 
> > to other MTA. Maybe it's time to revisit ?
> > 
> > 
> 
> well what's there now is incorrect, so i think something needs to
> happen. even if we just prefix the text with "For databases" or
> something.

But you need "smtpctl update table aliases" instead don't you? (At least
that is how I read the manual).

(It would seem useful if "newaliases" did whatever is necessary for the
table type you have in use so you don't need to think about it and the
documentation can be simple..)



Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Consus
On 11:49 Wed 31 May, Antoine Jacoutot wrote:
> I proposed the same a while ago but people preferred to keep it in
> regard to other MTA. Maybe it's time to revisit ?

Looks like I already have proposed it last September. Totally forgot =/



Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Jason McIntyre
On Wed, May 31, 2017 at 11:49:18AM +0200, Antoine Jacoutot wrote:
> On May 31, 2017 11:35:28 AM GMT+02:00, Consus  wrote:
> >OpenBSD defaults to file table now so there is no need in running
> >newaliases(8).
> >---
> > etc/mail/aliases | 8 ++--
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> >diff --git a/etc/mail/aliases b/etc/mail/aliases
> >index c1ac04b5a81..045b2b2a456 100644
> >--- a/etc/mail/aliases
> >+++ b/etc/mail/aliases
> >@@ -1,12 +1,8 @@
> > #
> > #   $OpenBSD: aliases,v 1.64 2017/03/18 21:18:01 florian Exp $
> > #
> >-#  Aliases in this file will NOT be expanded in the header from
> >-#  Mail, but WILL be visible over networks or from
> >/usr/libexec/mail.local.
> >-#
> >-#   >>  The program "newaliases" must be run after
> >-#   >> NOTE >>  this file is updated for any changes to
> >-#   >>  show through to smtpd.
> >+#  Aliases in this file will NOT be expanded in the header from Mail,
> >but WILL
> >+#  be visible over networks or from /usr/libexec/mail.local.
> > #
> > 
> > # Basic system aliases -- these MUST be present
> >-- 
> >2.13.0
> 
> I proposed the same a while ago but people preferred to keep it in regard to 
> other MTA. Maybe it's time to revisit ?
> 
> 

well what's there now is incorrect, so i think something needs to
happen. even if we just prefix the text with "For databases" or
something.

jmc



Re: [PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Antoine Jacoutot
On May 31, 2017 11:35:28 AM GMT+02:00, Consus  wrote:
>OpenBSD defaults to file table now so there is no need in running
>newaliases(8).
>---
> etc/mail/aliases | 8 ++--
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/etc/mail/aliases b/etc/mail/aliases
>index c1ac04b5a81..045b2b2a456 100644
>--- a/etc/mail/aliases
>+++ b/etc/mail/aliases
>@@ -1,12 +1,8 @@
> #
> # $OpenBSD: aliases,v 1.64 2017/03/18 21:18:01 florian Exp $
> #
>-#  Aliases in this file will NOT be expanded in the header from
>-#  Mail, but WILL be visible over networks or from
>/usr/libexec/mail.local.
>-#
>-# >>  The program "newaliases" must be run after
>-# >> NOTE >>  this file is updated for any changes to
>-# >>  show through to smtpd.
>+#  Aliases in this file will NOT be expanded in the header from Mail,
>but WILL
>+#  be visible over networks or from /usr/libexec/mail.local.
> #
> 
> # Basic system aliases -- these MUST be present
>-- 
>2.13.0

I proposed the same a while ago but people preferred to keep it in regard to 
other MTA. Maybe it's time to revisit ?


-- 
Antoine

[PATCH] Do not mention newaliases(8) in /etc/mail/aliases

2017-05-31 Thread Consus
OpenBSD defaults to file table now so there is no need in running
newaliases(8).
---
 etc/mail/aliases | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/etc/mail/aliases b/etc/mail/aliases
index c1ac04b5a81..045b2b2a456 100644
--- a/etc/mail/aliases
+++ b/etc/mail/aliases
@@ -1,12 +1,8 @@
 #
 #  $OpenBSD: aliases,v 1.64 2017/03/18 21:18:01 florian Exp $
 #
-#  Aliases in this file will NOT be expanded in the header from
-#  Mail, but WILL be visible over networks or from /usr/libexec/mail.local.
-#
-#  >>  The program "newaliases" must be run after
-#  >> NOTE >>  this file is updated for any changes to
-#  >>  show through to smtpd.
+#  Aliases in this file will NOT be expanded in the header from Mail, but WILL
+#  be visible over networks or from /usr/libexec/mail.local.
 #
 
 # Basic system aliases -- these MUST be present
-- 
2.13.0