improved usage for pilerexport and pilerimport

This commit is contained in:
SJ 2015-11-04 08:50:41 +01:00
parent 3915d53d56
commit a3340e1291
2 changed files with 38 additions and 13 deletions

View File

@ -34,17 +34,22 @@ int export_emails_matching_to_query(struct session_data *sdata, struct __data *d
void usage(){ void usage(){
printf("\nusage: pilerexport \n\n"); printf("\nusage: pilerexport\n\n");
printf(" [-c|--config <config file>] \n");
printf(" -a|--start-date <YYYY.MM.DD> -b|--stop-date <YYYY.MM.DD> \n"); printf(" [-c <config file>] Config file to use if not the default\n");
printf(" -f|--from <email@address> -r|--to <email@address>\n"); printf(" -a <start date> Start date in YYYY.MM.DD format\n");
printf(" -F|--from-domain <domain.com> -R|--to-domain <domain.com>\n"); printf(" -b <stop date> Stop date in YYYY.MM.DD format\n");
printf(" -s|--minsize <number> -S|--maxsize <number>\n"); printf(" -f <email@address.com> From address\n");
printf(" -w|--where-condition (eg. \"match('@subject: piler')\"\n"); printf(" -r <email@address.com> Recipient address\n");
printf(" -m|--max-matches (default: %d)\n", max_matches); printf(" -F <domain.com> From domain\n");
printf(" -i|--index-list (default: %s)\n", index_list); printf(" -R <domain.com> Recipient domain\n");
printf(" -A|--all -d|--dryrun \n"); printf(" -s <size> Min. size\n");
printf("\n use -A if you don't want to specify the start/stop time nor any from/to address\n\n"); printf(" -S <size> Max. size\n");
printf(" -w <where condition> Where condition to pass to sphinx, eg. \"match('@subject: piler')\"\n");
printf(" -m <max. matches> Max. matches to apply to sphinx query (default: %d)\n", max_matches);
printf(" -i <index list> Sphinx indices to use (default: %s)\n", index_list);
printf(" -A Export all emails from archive\n");
printf(" -d Dry run\n");
regfree(&regexp); regfree(&regexp);

View File

@ -471,8 +471,28 @@ ENDE:
void usage(){ void usage(){
printf("usage: pilerimport [-c <config file>] -e <eml file> | -m <mailbox file> | -d <directory> | -i <imap server> | -K <pop3 server> | -u <imap username> -p <imap password> -P <imap port>\n"); printf("\nusage: pilerimport\n\n");
printf(" [-t <timeout in sec>] [-x <folder1,folder2,....,folderN,>] [-f <imap foldername>] [-F <foldername>] [-b <batchlimit>] [-s <start positiion>] [-D] [-o] [-R] [-r] [-q]\n"); printf(" [-c <config file>] Config file to use if not the default\n");
printf(" -e <eml file> EML file to import\n");
printf(" -m <mailbox file> Mbox file to import\n");
printf(" -d <dir> Directory with EML files to import\n");
printf(" -i <imap server> IMAP server to connect\n");
printf(" -K <pop3 server> POP3 server to connect\n");
printf(" -u <username> Username for imap/pop3 import\n");
printf(" -p <password> Password for imap/pop3 import\n");
printf(" -P <port> Port for imap/pop3 import (default: 143/110\n");
printf(" -t <timeout> Timeout in sec for imap/pop3 import\n");
printf(" -x <folder1,folder2,....folderN,> Comma separated list of imap folders to skip. Add the trailing comma!\n");
printf(" -f <imap folder> IMAP folder name to import\n");
printf(" -F <folder> Piler folder name to assign to this import\n");
printf(" -b <batch limit> Import only this many emails\n");
printf(" -s <start position> Start importing POP3 emails from this position\n");
printf(" -D Dry-run, do not import anything\n");
printf(" -o Only download emails for POP3/IMAP import\n");
printf(" -R Recursive piler folder names\n");
printf(" -r Remove imported emails\n");
printf(" -q Quiet mode\n");
exit(0); exit(0);
} }