On Tue, 15 Oct 2019 22:23, David Hebbeker said:
> The manual [1] says that GnuPG can automatically retrieve keys for
> emails in the "[email protected]" form. Does this exclude emails wrapped
> by angle brackets like "<[email protected]>"?

That is fine.  Find below our test addresses.


Salam-Shalom,

   Werner



ps.
Here is our test data set. The second string is the exepcted result, if
it is NULL we can't extract a mail address from the string:

      { "Werner Koch <[email protected]>", "[email protected]" },
      { "<[email protected]>", "[email protected]" },
      { "[email protected]", "[email protected]" },
      { "[email protected] ", NULL },
      { " [email protected]", NULL },
      { "Werner Koch (test) <[email protected]>", "[email protected]" },
      { "Werner Koch <[email protected]> (test)", "[email protected]" },
      { "Werner Koch <[email protected] (test)", NULL },
      { "Werner Koch <[email protected] >", NULL },
      { "Werner Koch <[email protected]", NULL },
      { "", NULL },
      { "@", NULL },
      { "bar <>", NULL },
      { "<[email protected]>", "[email protected]" },
      { "<[email protected]>", "[email protected]" },
      { "<[email protected]>", "[email protected]" },
      { "<[email protected]>", "[email protected]" },
      { "<[email protected]>", "[email protected]" },
      { "<[email protected].>", NULL },
      { "<[email protected]>", NULL },
      { "<foo@.>", NULL },
      { "<@example.org>", NULL },
      { "<foo@@example.org>", NULL },
      { "<@[email protected]>", NULL },
      { "<[email protected]> ()", "[email protected]" },
      { "<fo()[email protected]> ()", "fo()[email protected]" },
      { "<fo()[email protected]> ()", "fo()[email protected]" },
      { "fo()[email protected]", NULL},
      { "Mr. Foo <[email protected]><[email protected]>", "[email protected]"},
      { "Surname, Forename | company <[email protected]>", "[email protected]"},
      /* The next one is for sure not RFC-822 correct but nevertheless
       * the way gpg does it.  We won't change it because the user-id
       * is only rfc-822 alike and not compliant (think only of our
       * utf-8 requirement).  */
      { "\"<[email protected]>\" <[email protected]>", "[email protected]"},

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to