aboutsummaryrefslogtreecommitdiffstats
path: root/common/mbox-util.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: Add gnupg_memstr to replace static versions.Werner Koch2023-09-261-30/+1
| | | | | | | | * common/stringhelp.c (gnupg_memstr): New. * common/mbox-util.c (my_memstr): Remove. (is_valid_mailbox_mem): Use gnupg_memstr. * common/recsel.c (my_memstr): Remove. (recsel_select): Use gnupg_memstr.
* common: Prepare for parsing mail sub-addresses.Werner Koch2018-11-121-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* common: New function to validate domain names.Werner Koch2018-07-271-0/+39
| | | | | | | * common/mbox-util.c (is_valid_domain_name): New. * common/t-mbox-util.c (run_dns_test): New test. Signed-off-by: Werner Koch <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* doc: Some additional source commentsWerner Koch2016-08-241-0/+4
| | | | --
* common: Change license of mbox-util to LGPLv2.1+.Werner Koch2016-08-221-14/+4
| | | | | | | | -- Noet that the code has entirely been written by me. Signed-off-by: Werner Koch <[email protected]>
* common: Add function is_valid_mailbox_mem.Werner Koch2015-03-201-25/+80
| | | | | | | | | | * common/mbox-util.c (mem_count_chr): New. (my_memstr): New. (has_invalid_email_chars): Change args to work on a buffer. (is_valid_mailbox_mem): New. (is_valid_mailbox): Rewrite to use is_valid_mailbox_mem. Signed-off-by: Werner Koch <[email protected]>
* gpg: Lowercase mailbox for PKA lookups.Werner Koch2015-02-261-3/+4
| | | | | | | | * common/stringhelp.c (ascii_strlwr): New. * common/mbox-util.c (mailbox_from_userid): Downcase result. -- Signed-off-by: Werner Koch <[email protected]>
* Move new mailbox.c source file to common/.Werner Koch2015-02-251-0/+193
* g10/mailbox.c: Move to ... * common/mbox-util.c: new file. * common/mbox-util.h: New. Include where needed. * g10/t-mailbox.c: Move to ... * common/t-mbox-util.c: new file. -- This will make it easier to use the code by other modules in common/.