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

Extend canonical augeas lens regex #382

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

giacomd
Copy link
Contributor

@giacomd giacomd commented Feb 7, 2024

Pull Request (PR) description

Add support for a wider range of e-mail addresses.

From RFC 3696 (informational only but referring to RFC 2821 and RFC 2822):

   Without quotes, local-parts may consist of any combination of
   alphabetic characters, digits, or any of the special characters

      ! # $ % & ' * + - / = ?  ^ _ ` . { | } ~

   period (".") may also appear, but may not be used to start or end the
   local part, nor may two or more consecutive periods appear.  Stated
   differently, any ASCII graphic (printing) character other than the
   at-sign ("@"), backslash, double quote, comma, or square brackets may
   appear without quoting.  If any of that list of excluded characters
   are to appear, they must be quoted.

Note that due to the format of canonical(5) we can't include addresses starting with # despite being valid e-mail addresses as they are treated as comments. Apart from that exclusion, the defined regexp is a compromise that includes a bit more than allowed (in particular includes addresses with multiple @ and doesn't check for . not being at the start or at the end of the local part, but as discussed at #345 this should be fine.

This Pull Request (PR) fixes the following issues

Fixes #345

@smortex smortex added the bug Something isn't working label Feb 7, 2024
@smortex smortex changed the title Extend canonical augeas lens regex (fixes #345) Extend canonical augeas lens regex Feb 7, 2024
@smortex smortex merged commit 5284189 into voxpupuli:master Feb 7, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

canonical map doesn't accept underscores in destination address
3 participants