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 were duplicates.

On 14 March 2017 at 12:34, Samuel Williams
<space.ship.travel...@gmail.com> wrote:
> 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 with one aliases file, but
> the postalias tool for updating it doesn't merge records together in
> any meaningful way and I don't know if it's possible using the current
> implementation. The best thing I can think of is a custom tool to
> merge those files.
>
> 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.
>
> What would be nice if postalias could have a merge mode, which allows
> multiple aliases files to be merged logically (e.g. same LHS, produce
> ordered set union of RHS).

Reply via email to