Aaron Stone wrote:
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!
Please show me a *single* unix command that uses an asterisk in it's
*commandline syntax* where the globbing is not shell related.
dbmail-export -u * will simply not work because of the shell. At the very least
you'll have to use dbmail-export -u '*' which is plain silly imo.
My vote goes to --all-users or something similarly verbose rather than allowing
regex or glob pattern in the users matching. If people want to dump based on a
pattern they can write very simple scripts to do it for them: that's why I made
the output of dbmail-users -l machine readable. I just don't see the usecase
where this is useful.
I'd say: kiss, or if you can't stop yourself from doing this: keep it out of the
2.2 branch until it is well tested.
--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail