On Tue, 2007-07-17 at 18:29 +0800, zamri wrote:
> 
> 
> On 7/16/07, Paul J Stevens <[EMAIL PROTECTED]> wrote:
>         Jorge Bastos wrote:
>         > Aaron,
>         >
>         > My suggesting is never run without one, at least one
>         argument, for all,
>         > i woul'd say "--all-users" or "--all" or similar.
>         > What do you thing? 
>         > I'm not making this as a rule, just a sugestiong, tell me
>         what you think.
>         
>         I agree here. Exporting all should never occur by accident.
> 
> Yes. It shouldn't.  
> 
> Suggestion:
> 
> dbmail-export = dbmail-export --help = dbmail-export -h
> 
> Export all users: dbmail-export --all = dbmail-export -a (with a
> confirmation) = dbmail-export --all = dbmail-export -ay (without
> confirmation) = dbmail-export --all --yes 

Thanks, unfortunately this would change existing behavior. I need to
preserve the basic syntax:

  User foo all mailboxes:
    dbmail-export -u foo
  User foo mailbox box:
    dbmail-export -u foo -m box
  User foo mailbox box dumped into file file:
    dbmail-export -u foo -m box -o file

Since I think being able to dump users by pattern is very useful,
(thanks for the suggestion, Geir!), and "-u *" comes for free at that
point, adding a separate -a/--all seems redundant.

Now we have the possibilities of:

  All users:
    dbmail-export -u *
  All users mailboxes named spam:
    dbmail-export -u * -m spam
  Users starting with 'fo' mailboxes named spam dumped into a single
giant mbox file (think spam training corpus!):
    dbmail-export -u fo* -m spam -o fo_spam

It might have been nice to require "-m *" or "-m * -r" to dump all
mailboxes, but that would break the old behavior of dumping everything
for the user if you didn't give a mailbox name.

Does all this seem reasonable? Please poke holes in the syntax if you
find something that doesn't make sense!

Aaron

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to