managing multiple virtual_alias_map *flat* files ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

managing multiple virtual_alias_map *flat* files ?

PGNet Dev
I'm exploring an all flat-file virtual-address-only postfix setup.  well, using lmdb -- NOT sql or ldap, to be accurate.

When it comes to alias management, I'm not convinced my approach is (easily) doable in flat-files.

For each virtual address defined in

        virtual_mailbox_maps    = lmdb:/etc/postfix/virtual_mailbox_maps

e.g.,

        cat virtual_mailbox_maps
                [hidden email]                 example.com/user1
                [hidden email]                 example.com/user2

rather than a single alias map file, I'd _like_ a separate virtual alias map per real address. i.e.,

        /etc/postfix/virtual_alias_maps/[hidden email]
        /etc/postfix/virtual_alias_maps/[hidden email]

where, e.g.,

        /etc/postfix/virtual_alias_maps/[hidden email]
                [hidden email]    JUNKTEXT
                [hidden email]   JUNKTEXT

        /etc/postfix/virtual_alias_maps/[hidden email]
                [hidden email]   JUNKTEXT
                [hidden email]   JUNKTEXT


, with JUNKTEXT ignored, and the redirect_to replaced by the filename -- in this case, "[hidden email]" & "[hidden email]", respectively.

can that be managed with postfix out of the box?

if so, what would be the form of

        virtual_alias_maps =

in postfix config?

And, does postifx do any checking to avoid multiple-instances of a single alias? I.e., preventing collisioin of the same alias redirecting to same target virtual address?

All of that^ is certainly doable with SQL/LDAP.

For this setup, If I _can_ avoid DB/LDAP, I'd like to ... just not convinced if/how I manage this^ without too much 'kludge'.


Thoughts/suggestions?

Reply | Threaded
Open this post in threaded view
|

Re: managing multiple virtual_alias_map *flat* files ?

Viktor Dukhovni
On Sat, Sep 12, 2020 at 11:52:51AM -0700, PGNet Dev wrote:

> I'm exploring an all flat-file virtual-address-only postfix setup.
> well, using lmdb -- NOT sql or ldap, to be accurate.

This feels like an instance of an XY problem.  Your approach to problem
X leads you to approach Y, which runs into an issue, and so now you're
asking about Y, but really you should start by asking about X.

What is the actual goal here?  What sort of virtual alias management
problem are you trying to solve by partitioning virtual aliases across
multiple source files.  Why are you loathe to consider a database, ...

Are you experiencing Qmail nostalgia? :-)

In Qmail you get an alias file *per-domain*, with domains owned by some
user, and then an alias for each domain managed by the owning user.

Pushing the model to alias file per user, without first scoping the
aliases to a domain owned by the user is likely ill-defined, who gets to
claim which aliases?

Questions about how to assemble virtual aliases are premature absent
a clear data model.

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: managing multiple virtual_alias_map *flat* files ?

PGNet Dev
On 9/12/20 3:26 PM, Viktor Dukhovni wrote:
> What is the actual goal here?

having recently migrated a few boxes from my own, DIY'd app & prereq builds to distro pkg'ing reminded of the 'joys' of pulling in bloated dependencies, etc.


i'm simply exploring an as-thin-as-possible/lightweight deployment.  minimal external dependencies, etc. -- ideally _just_ requiring a postfix install, and flatfiles.


> What sort of virtual alias management
> problem are you trying to solve by partitioning virtual aliases across
> multiple source files.

an interest in matching the way I organize my own information.  

> Why are you loathe to consider a database, ...

hardly loathe.

see above re: exploring & thin/lightweight

> Are you experiencing Qmail nostalgia? :-)

don't we all, secretly?

> Questions about how to assemble virtual aliases are premature absent a clear data model.

Reply | Threaded
Open this post in threaded view
|

Re: managing multiple virtual_alias_map *flat* files ?

Viktor Dukhovni
On Sat, Sep 12, 2020 at 04:52:43PM -0700, PGNet Dev wrote:

> On 9/12/20 3:26 PM, Viktor Dukhovni wrote:
> > What is the actual goal here?
>
> having recently migrated a few boxes from my own, DIY'd app & prereq builds to distro pkg'ing reminded of the 'joys' of pulling in bloated dependencies, etc.
>
> i'm simply exploring an as-thin-as-possible/lightweight deployment.  minimal external dependencies, etc. -- ideally _just_ requiring a postfix install, and flatfiles.

If this is just your own way to organise data managed by a single
authority (you), then organise it any way you like, then run "make"
to create a single virtual(5) aliases file that you "postmap" in
the usual way.

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: managing multiple virtual_alias_map *flat* files ?

PGNet Dev
On 9/12/20 5:03 PM, Viktor Dukhovni wrote:
> If this is just your own way to organise data managed by a single
> authority (you)

in _this_ case, it is.

> then organise it any way you like, then run "make"
> to create a single virtual(5) aliases file that you "postmap" in
> the usual way.

to date, on my rather more expansive installs, I've kept a list of disparate sources

i had simply not thought to use make to consolidate whatever hodge-podge i cobble up into a single aliases file.


perfect!



thx o/