[exim-dev] RFC: private vs. generic options in routers and t…

Top Pagina
Delete this message
Reply to this message
Auteur: Heiko Schlittermann
Datum:  
Aan: exim-dev
Onderwerp: [exim-dev] RFC: private vs. generic options in routers and transports
Hello,

when giving lessons about Exim it's always not easy to differentiate
between the generic and the private options in the driver instance
configuration blocks.

Let me demonstrate this using the modified default config

    begin routers


        dnslookup:
            driver  = dnslookup
            check_srv = yes
            domains = !+local_domains
            transport = remote_smtp
            ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
            no_more


Nobody can tell on the first sight, which of these options is a generic
router option and which one is private to dnslookup. "check_srv" -
generic or private. (Of course, if you're familiar with DNS and with
Exim you can tell, but not everybody is…)

One aproach could be to re-order the options, putting the generic
options first, then the driver and then the private options.

But it doesn't help a lot, since it somehow obfuscates the
information flow (ignore_target_hosts is evaluated when the driver *did*
its job):

        dnslookup:
            domains = !+local_domains
            ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
            driver  = dnslookup
            transport = remote_smtp
            no_more
            check_srv = yes


Re-ordering in another way

        dnslookup:
            domains = !+local_domains
            driver  = dnslookup
            check_srv = yes
            ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
            transport = remote_smtp
            no_more


… cures a bit only, because now again nobody sees if
"ignore_target_hosts" is private or generic.

What about adding some syntactic sugar, some decorations,
to the private options. Either this way

        dnslookup:
            driver  = dnslookup
            _check_srv = yes
            domains = !+local_domains
            transport = remote_smtp
            ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
            no_more


… or even more verbose:

        dnslookup:
            driver  = dnslookup
            dnslookup.check_srv = yes
            domains = !+local_domains
            transport = remote_smtp
            ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
            no_more


What do you think? It's kind of a change, but with sensible coding it
could be made compatible with all existing configurations.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
 gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-