pilerimport fixes

This commit is contained in:
SJ
2014-10-15 23:22:36 +02:00
parent 3aa0ebe4a6
commit eb2aa4df8f
5 changed files with 20 additions and 10 deletions

View File

@@ -472,7 +472,7 @@ ENDE:
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(" [-x <folder1,folder2,....,folderN,>] [-f <imap foldername>] [-F <foldername>] [-b <batchlimit>] [-s <start positiion>] [-D] [-R] [-r] [-q]\n");
printf(" [-x <folder1,folder2,....,folderN,>] [-f <imap foldername>] [-F <foldername>] [-b <batchlimit>] [-s <start positiion>] [-D] [-o] [-R] [-r] [-q]\n");
exit(0);
}
@@ -499,6 +499,7 @@ int main(int argc, char **argv){
import.started = import.updated = import.finished = import.remove_after_import = 0;
import.extra_recipient = NULL;
import.start_position = 1;
import.download_only = 0;
data.import = &import;
@@ -530,6 +531,7 @@ int main(int argc, char **argv){
{"quiet", no_argument, 0, 'q' },
{"recursive", required_argument, 0, 'R' },
{"remove-after-import",no_argument, 0, 'r' },
{"only-download",no_argument, 0, 'o' },
{"gui-import", no_argument, 0, 'G' },
{"dry-run", no_argument, 0, 'D' },
{"help", no_argument, 0, 'h' },
@@ -538,9 +540,9 @@ int main(int argc, char **argv){
int option_index = 0;
c = getopt_long(argc, argv, "c:m:M:e:d:i:K:u:p:P:x:F:f:a:b:s:GDRrqh?", long_options, &option_index);
c = getopt_long(argc, argv, "c:m:M:e:d:i:K:u:p:P:x:F:f:a:b:s:GDRroqh?", long_options, &option_index);
#else
c = getopt(argc, argv, "c:m:M:e:d:i:K:u:p:P:x:F:f:a:b:s:GDRrqh?");
c = getopt(argc, argv, "c:m:M:e:d:i:K:u:p:P:x:F:f:a:b:s:GDRroqh?");
#endif
if(c == -1) break;
@@ -613,6 +615,11 @@ int main(int argc, char **argv){
data.import->remove_after_import = 1;
break;
case 'o' :
data.import->download_only = 1;
dryrun = 1;
break;
case 'b' :
data.import->batch_processing_limit = atoi(optarg);
break;