Re: Merging multiple aliases files together

2017-03-13 Thread Viktor Dukhovni
> On Mar 14, 2017, at 12:05 AM, Samuel Williams > wrote: > > Viktor, do you mind clarifying why you don't think it's sensible > behaviour? Like, what specifically is wrong with this approach? > Perhaps I'm missing something important. Poor orthogonality in tool design. The postmap(1) and post

Re: Merging multiple aliases files together

2017-03-13 Thread Samuel Williams
Viktor, do you mind clarifying why you don't think it's sensible behaviour? Like, what specifically is wrong with this approach? Perhaps I'm missing something important. I don't mind adding a script to merge aliases, and it may be what I end up doing. I see both pros and cons with this approach. H

Re: Merging multiple aliases files together

2017-03-13 Thread Noel Jones
On 3/13/2017 6:34 PM, Samuel Williams wrote: > I don't really want to add a full blown MySQL, PgSQL or LDAP daemon > for just 2-3 user accounts. It's not a primary function of the server > and adds a lot of overhead/surface area. Consider using SQLite for this. No daemon, minimal config, yet real

Re: Merging multiple aliases files together

2017-03-13 Thread Viktor Dukhovni
> On Mar 13, 2017, at 7:56 PM, Samuel Williams > wrote: > > Just wondering, looking at the source code, it should be possible to > create a merge mode for postalias. Would you accept a PR for this? So > the use case would be something like > > cat /etc/postfix/aliases /etc/postfix/aliases.d/*

Re: Merging multiple aliases files together

2017-03-13 Thread Samuel Williams
Just wondering, looking at the source code, it should be possible to create a merge mode for postalias. Would you accept a PR for this? So the use case would be something like cat /etc/postfix/aliases /etc/postfix/aliases.d/* | postalias -Mi aliases And it would merge together records if there we

Re: Merging multiple aliases files together

2017-03-13 Thread Samuel Williams
Thanks Viktor. > Automatic combination of multiple results into a single comma-separated outcome is a feature of the LDAP, MySQL and PgSQL table drivers. > Put your aliases into a database, and you'll get the automatic merging of multiple lookup results. It's possible to achieve what I want just

Re: Merging multiple aliases files together

2017-03-13 Thread Viktor Dukhovni
> On Mar 13, 2017, at 7:04 PM, Samuel Williams > wrote: > > I have 0 or more of these user packages, and I want to, some how, > merge all these aliases together. So, if another user has `root: > dole`, the final entry would be equivalent to `root: bob, dole`. Automatic combination of multiple

Merging multiple aliases files together

2017-03-13 Thread Samuel Williams
I don't know the best way to achieve this. I have some "user" packages which install various users on a linux system. I want the setup to be entirely automated, and as part of this I want to set up some mail aliases for each user, and add their alias to the root alias. Essentially, the following r