Skip to Content.
Sympa Menu

devel - [sympa-developpers] Question about a complex setting I want to add

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Luc Didry <address@concealed>
  • To: address@concealed
  • Subject: [sympa-developpers] Question about a complex setting I want to add
  • Date: Fri, 16 Nov 2018 12:23:25 +0100

Hello,

I want to work on https://github.com/sympa-community/sympa/issues/296,
that suggests a domains correction feature. For ex., automatically
change addresses in gmail.fr to the correct domain, gmail.com.

I need a way to let the admin give a complex setting like that:
domain_correction {
gmail.com => ['gmail.*'],
wanadoo.fr => ['wandoo.fr', 'wanado.fr']
}

As you can see, I want to not only handle a simple substitution of
text, but with a sort of a globbing feature (just globbing, I think
regexes would be too error-prone).

I already succeded to add a setting that has a comma-separated list as
value, and split it to use it, but what I want to do is more complex.

This is what I consider:
- adding a boolean setting to use the domain correction or not
- having the perl structure in a file in the `default` directory, so
it can be overriden (so the real configuration of the feature would
be in it, not in `sympa.conf`)
- when using the domain correction, that file would be read and used

What do you think?
--
Luc
"La route est longue, mais la voie est libre…" https://framasoft.org

Framasoft ne vit que par vos dons (déductibles des impôts). Merci d'avance
pour votre soutien https://soutenir.framasoft.org







Archive powered by MHonArc 2.6.19+.

Top of Page