Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E-mail address canonicalization additions #761

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ilbelkyr
Copy link
Member

This isn't quite complete yet but does aim to address #736. So far, this adds:

  • nickserv/canonmail to let services operators debug their canonicalizer configuration
  • misc/canon_domains module to canonicalize multiple email domains into the same

There's no documentation for this in the example config or NEWS.md yet. I'll add that once #757 is merged so there won't be a need to resolve merge conflicts.

Potential things to add before merging this:

  • wildcard support for canon_domains? Not sure if this is needed; it wouldn't be too hard to add
  • do we want to allow this to be configurable via IRC?
    • do we allow IRC and file-based config to coexist (as is the case with operserv/soper and operator {} blocks right now)? how would we handle conflicts?
    • we could also allow either file or DB based config but not both concurrently – less flexible but also less confusing (both for network staff and implementation-wise)
  • optional dot stripping in localparts (foo.bar@ into foobar@)
  • optional removal of plus extensions (foo+bar@ into foo@)
    • allow a separator other than + to be configured
  • how would the above interact with canon_domains, would it be reasonable to make them configurable on a per-provider basis? can per-provider config coexist with per-domain config?
  • do we want this to interact with badmail?
    • currently, badmail doesn't care about canonicalization at all
    • making badmail check the canonicalized email would allow badmailing an entire provider by banning what it gets canonicalized to – currently, that'll be the shortest domain, which isn't super intuitive
    • how reasonable would it be to consolidate this with badmail for an all-in-one email address configuration interface?
      • would definitely need the IRC-side config part
      • could have per-provider/per-domain "blocked" setting with customizable message and internal reason (cf user-facing BADMAIL reasons would be cool #740 as well)
      • keep BADMAIL interface for compatibility?
  • a lot of the above could arguably be provided by modules with a suitable mechanism to hook into a generic email configuration module

(I might be overthinking things a little)

@ilbelkyr ilbelkyr linked an issue Feb 14, 2021 that may be closed by this pull request
This module originated as a way to test email canonicalization during
development, but it may also be helpful to services operators to test
their canonicalizer configuration, especially if custom modules are used
that may do non-obvious modifications to the given email.
This module is mainly intended to handle email providers with multiple
interchangable domains serving the same users on each.

For now this is rather simplistic, requiring mappings to be defined in
the configuration file and not supporting wildcards or anything fancier
than "treat these domains as the same".

All domains of a given provider will be mapped to the shortest domain to
avoid having to handle the case of extending the length of an email
address, possibly exceeding EMAILLEN.

(Do note that nickserv/badmail currently does not interface with email
canonicalization and domains need to be added to that list separately
if they are to be denied.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

canon_gmail.c but, like, for everyone
1 participant