[exim-dev] [Bug 3084] New: Aliases for datasources

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Exim Bugzilla
Date:  
À: exim-dev
Nouveaux-sujets: [exim-dev] [Bug 3084] Aliases for DB datasources, [exim-dev] [Bug 3084] Aliases for DB datasources, [exim-dev] [Bug 3084] Aliases for DB datasources
Sujet: [exim-dev] [Bug 3084] New: Aliases for datasources
https://bugs.exim.org/show_bug.cgi?id=3084

            Bug ID: 3084
           Summary: Aliases for datasources
           Product: Exim
           Version: N/A
          Hardware: All
                OS: All
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: Lookups
          Assignee: unallocated@???
          Reporter: lehmann@???
                CC: exim-dev@???


The documentation gives an example of specifying multiple datasources:

mysql_servers = slave1/db/name/pw:\
                slave2/db/name/pw:\
                master/db/name/pw


It also gives an example of routing a lookup to a specific datasource of the
previously defined ones:

${lookup mysql,servers=master {UPDATE ...} }

While these master/slave1/slave2 names look nice in the example, they actually
refer to server names, ie. full hostnames. In real life these examples might
rather look like this:

mysql_servers = db-rep1.mail.company.com/db/name/pw:\
                db-rep2.mail.company.com/db/name/pw:\
                db.mail.company.com/db/name/pw


${lookup mysql,servers=db.mail.company.com {UPDATE ...} }

While this is a purely aesthetical issue, using the server names for the
lookups causes problems when using different databases on the same server.
Let's think of this:

mysql_servers = db.mail.company.com/config/readonly-user/pw:\
                db.mail.company.com/metrics/readwrite-user/pw:\


Currently, there is no way to route the "lookup" (which doesn't seem to be the
ideal term for an UPDATE statement) to the correct database.

To solve both situations, I wish there was a way to create aliases for
datasources. That way, you could use catchy logical names like "db-main" or
"mail-metrics" in the lookup. I'd like to leave coming up with a particular
syntax to the maintainers.

Btw.: Currently exim doesn't check for duplicate entries, neither for the whole
set of server/database/username/password, nor the server name. That's something
which might be targeted in this context as well.

--
You are receiving this mail because:
You are on the CC list for the bug.

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/