diff options
| author | Werner Koch <[email protected]> | 2018-11-12 06:44:33 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2018-11-12 06:44:33 +0000 |
| commit | 6b9f772914624cc673ba26d49b6e3adc32dd7e0a (patch) | |
| tree | c4366bbf661f10aba5c1441c299789eb2da2b57a /tools/gpg-wks-client.c | |
| parent | gpg: Fix format string in gpgcompose.c (diff) | |
| download | gnupg-6b9f772914624cc673ba26d49b6e3adc32dd7e0a.tar.gz gnupg-6b9f772914624cc673ba26d49b6e3adc32dd7e0a.zip | |
common: Prepare for parsing mail sub-addresses.
* common/mbox-util.c (mailbox_from_userid): Add arg subaddress and
implement. Change all callers to pass false for it.
* common/t-mbox-util.c (run_mbox_no_sub_test): New.
(run_filter): Add arg no_sub.
(main): Call new test and add option --no-sub.
--
Some stats: In the about 5300000 keys on the SKS servers we found 3055
unique mailboxes with a '+' in it. After removing leading and
trailing '+' as well as multiple '+' (e.g. "c++" or "foo+bar+baz")
2697 were left which seem to be valid sub-addresses.
To filter mailboxes out from a line delimited list with
user-ids (e.g. an SQL output), the command
t-mbox-util --verbose --filter
can be used; to output w/o sub-addresses add --no-sub.
GnuPG-bug-id: 4200
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpg-wks-client.c')
| -rw-r--r-- | tools/gpg-wks-client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c index bf6b119e0..0be5ea89b 100644 --- a/tools/gpg-wks-client.c +++ b/tools/gpg-wks-client.c @@ -627,11 +627,11 @@ command_supported (char *userid) if (!strchr (userid, '@')) { char *tmp = xstrconcat ("foo@", userid, NULL); - addrspec = mailbox_from_userid (tmp); + addrspec = mailbox_from_userid (tmp, 0); xfree (tmp); } else - addrspec = mailbox_from_userid (userid); + addrspec = mailbox_from_userid (userid, 0); if (!addrspec) { log_error (_("\"%s\" is not a proper mail address\n"), userid); @@ -694,7 +694,7 @@ command_check (char *userid) uidinfo_list_t sl; int found = 0; - addrspec = mailbox_from_userid (userid); + addrspec = mailbox_from_userid (userid, 0); if (!addrspec) { log_error (_("\"%s\" is not a proper mail address\n"), userid); @@ -805,7 +805,7 @@ command_send (const char *fingerprint, const char *userid) goto leave; } - addrspec = mailbox_from_userid (userid); + addrspec = mailbox_from_userid (userid, 0); if (!addrspec) { log_error (_("\"%s\" is not a proper mail address\n"), userid); |
