On 29.6.2012, at 5.18, Daniel Parthey wrote:
wouldn't it be better to use a syntax similar to other doveadm commands, with labels for all arguments?
doveadm auth test -u <user> -p [<pass>] doveadm auth cache flush -u [<user>] doveadm auth cache stats
This will allow you to syntactically distinguish "commands" from "arguments". Otherwise you might run into the same "kludgy" syntax problem again, as soon as the number of subcommands changes.
The problem was with the "auth" toplevel command not having subcommands. I don't think there are going to be any problems with subcommands. Also there are many commands already that take <user> without the -u parameter. Actually it's only the "mail commands" that take -u parameter at all.
Another potential problem is "doveadm user" command. I'm wondering if it might be a good idea to move it to "doveadm auth user" or "doveadm auth userdb" command. There should be also a similar "doveadm auth passdb" command that does a passdb lookup without authentication.