input.module = "mail";
input.service = "indexer-worker";
input.username = args[0];
- input.session_id = args[2][0] == '\0' ? NULL : args[2];
+ /* if session-id is given, add -idx suffix to it so that stats process
+ doesn't complain about duplicates. also it's nicer to keep the stats
+ separate for the indexer and the caller. */
+ input.session_id = args[2][0] == '\0' ? NULL :
+ t_strconcat(args[2], "-idx", NULL);
if (mail_storage_service_lookup_next(conn->storage_service, &input,
&service_user, &user, &error) <= 0) {