Ilja Booij <[EMAIL PROTECTED]> said: > perhaps -W should be default?
My plan for -W is that if you give it a filename as an argument, it reads the file. If you give it '-' or no argument, then it reads from stdin (the '-' might turn off the friendly prompt, but otherwise read the same input). It might be reasonable to prompt for a password if none is given or to create the user without a password. Not sure which I like better. > If so, it should give feedback on what ir's going to do: For which user > is the password, and what kind of encryption is it going to use for the > password. There's only one user in the scenario, which is the user being operated on. It is assumed that anybody with access to this binary has the authority to manage user accounts. That's probably a bad assumption, and it might be a good idea to have a MySQL style administrative accounts table. If dbmail-users is setuid, then the dbmail.conf can be root readable only. That would disallow regular users from finding the database password and making changes directly. Also, I don't want to completely rebuild the application so much as I just want to make the interface more sane. Since we're starting to look at a lot more options than we'll easily have single character mnemonics for, either we can go for getopt_long (and for non-gnu systems, I have a public domain version) or we can use a hybrid of keywords and switches. Like this: dbmail-users add <username> -s [EMAIL PROTECTED] [EMAIL PROTECTED] -p <password> dbmail-users forward <[EMAIL PROTECTED]> -t <[EMAIL PROTECTED]> '|>>forwardlog' > perhaps an 'interactive' option would be nice, just like 'rm -i', which > asks gives feedback on the action: > > About to remove user foo > Is this correct? [y/N]: > > Using -i for this option would be best I guess (I see it's already taken > in your scheme) Just the opposite, I would prefer to have interactive mode by default and have an option to set non-prompting, force mode. I removed the quiet keyword, but definitely have plans to find a place to put it back in. Perhaps changing '-q quota' to '-m max' and so '-q means quiet/force all yes' OTOH, what if you want to be quiet, but not force? Or to be verbose, but forceful? Sounds like '-y means yes to all' might be needed. Aaron --
