Skip to Content.
Sympa Menu

devel - Re: [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: Re: [sympa-developpers] Question about a complex setting I want to add
  • Date: Tue, 20 Nov 2018 11:35:08 +0100

lundi 19 novembre 2018, 05:29:51 CET IKEDA Soji wrote:
> I feel wildcard may be overkill. For example:
> - gmail.de, gmail.com.br, gmail.co.kr etc. are registered by Google,
> - gmail.us, gmail.co.jp, gmail.ne.jp etc. are registered by the other
> organizations.
> "gmail.*" will match with all of them and might replace them with
> "gmail.com".

To me, those domains are just typosquatting (only gmail.ne.jp has a MX
record, the website does not respond and the port 25 is filtered by
firewall), thus do not deserve consideration.

I can add a warning about the use of wildcard, though.

> Exact matching or suffix matching seems better: Like Postfix's access
> table for host name patterns (See Postfix's access(5) manpage).

Mmh… Those are the patterns listed in this manpage:
- user@domain => irrelevant
- user@ => irrelevant
- domain.tld => that's the exact match feature (without subdomains
though)
- .domain.tld => personnally, I only have 2% of my 303987 subscribers
with a subdomain email and have never see one of thoses addresses
mistyped. I don't think that would be very relevant. Even less if we
keep the wilcard matching => *.domain.tld

> On file format, lists' config is suggestive. Below is an example using
> array of paragraphs (See also "Structure of configuration" in
> Sympa::Config):
>
> ```
> domain_correction
> from gmail.de
> to gmail.com
>
> domain_correction
> from gmail.com.br
> to gmail.com
>
> domain_correction
> from gmail.co.kr
> to gmail.com
>
> domain_correction
> from wandoo.fr
> to wanadoo.fr
>
> domain_correction
> from wanado.fr
> to wanadoo.fr
> ```
>
> Currently sympa.conf is less expressive (I plan to integrate it into
> Sympa::Config scheme above). Separate configuration file may be
> required at the present.
>

That would be really verbose (I got a lot of corrections to do).

You can see on
https://github.com/ldidry/sympa/commit/ea40312cb83dace7f7447680edd139e028a1e7cb
(just a WIP, the function will not be in src/lib/Sympa/Tools/Text.pm,
it will be in src/lib/Sympa/Tools/Domains.pm once
https://github.com/sympa-community/sympa/pull/478 will be merged) that
I did it that way (small change from my previous message, since I
splitted exact matches and patterns):

{
substitutions => {
'wanadoo.fr' => ['wandoo.fr', 'wanado.fr'],
'gmail.com' => ['gmail.de', 'gmail.com.br', 'gmail.co.kr']
},
globbing => { }
};

It's way more concise, practical (if you add a lot of corrections, you
have all the same domain correction at the same place) and avoid
repeating your-self
--
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