cli: support --ignored-address for init command

Allow for skipping unwanted addresses (such as 'noreply') from the
contacts cache.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-01 19:03:51 +03:00
parent 5dc41ed811
commit c4b5795328
7 changed files with 44 additions and 14 deletions

View File

@ -383,8 +383,12 @@ sub_init(CLI::App& sub, Options& opts)
"Top of the maildir")
->type_name("<maildir>");
sub.add_option("--my-address", opts.init.my_addresses,
"Personal e-mail addresses")
"Personal e-mail address or regexp")
->type_name("<address>");
sub.add_option("--ignored-address", opts.init.ignored_addresses,
"Ignored e-mail address or regexp")
->type_name("<address>");
sub.add_option("--max-message-size", opts.init.max_msg_size,
"Maximum allowed message size in bytes");
sub.add_option("--batch-size", opts.init.batch_size,
@ -393,6 +397,7 @@ sub_init(CLI::App& sub, Options& opts)
"Re-initialize database with current settings")
->excludes("--maildir")
->excludes("--my-address")
->excludes("--ignored-address")
->excludes("--max-message-size")
->excludes("--batch-size");
}