Skip to content

Commit fc6799d

Browse files
committed
mbop: add echo-maildir
1 parent 4a72afd commit fc6799d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

doc/gromox-mbop.8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ clear\-rwz: delete IPM.RuleOrganizer FAI messages from the inbox
3232
.IP \(bu 4
3333
delmsg: issue "delete_message" RPCs for a mailbox
3434
.IP \(bu 4
35+
echo\-maildir: return maildir (for use with foreach.here.*)
36+
.IP \(bu 4
3537
echo\-username: return username (for use with foreach.*)
3638
.IP \(bu 4
3739
emptyfld: remove objects from folders

tools/mbop_main.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static int cmd_parser(int, char **);
534534
static void command_overview()
535535
{
536536
fprintf(stderr, "Commands:\n\tclear-photo clear-profile clear-rwz delmsg "
537-
"echo-username "
537+
"echo-maildir echo-username "
538538
"emptyfld get-freebusy get-photo get-websettings "
539539
"get-websettings-persistent "
540540
"get-websettings-recipients ping "
@@ -609,6 +609,9 @@ static int main(int argc, char **argv)
609609
if (strcmp(argv[0], "purge-datafiles") == 0)
610610
ok = exmdb_client::purge_datafiles(g_storedir);
611611
else if (strcmp(argv[0], "echo-username") == 0) {
612+
printf("%s\n", g_storedir);
613+
ok = true;
614+
} else if (strcmp(argv[0], "echo-username") == 0) {
612615
printf("%s\n", g_dstuser.c_str());
613616
ok = true;
614617
} else if (strcmp(argv[0], "ping") == 0)
@@ -1132,6 +1135,9 @@ static int cmd_parser(int argc, char **argv)
11321135
if (ret == 0)
11331136
return delstoreprop(argc, argv, PSETID_Gromox, "websettings_recipienthistory", PT_UNICODE);
11341137
return ret;
1138+
} else if (strcmp(argv[0], "echo-maildir") == 0) {
1139+
printf("%s\n", g_storedir);
1140+
return EXIT_SUCCESS;
11351141
} else if (strcmp(argv[0], "echo-username") == 0) {
11361142
printf("%s\n", g_dstuser.c_str());
11371143
return EXIT_SUCCESS;

0 commit comments

Comments
 (0)