Zmmailbox command
The zmmailbox
command is a powerful tool used to manage and manipulate mailbox data in Zimbra, a popular open-source email server software. Here are some common uses and options for the zmmailbox
command:
Basic Syntax:
zmmailbox [options] [mailbox|folder|message]
Options:
-h
or--help
: Displays help information for the command.-v
or--verbose
: Enables verbose mode, which displays more detailed output.-q
or--quiet
: Suppresses output, except for errors.-a
or--account
: Specifies the account to use for the operation.-p
or--password
: Specifies the password for the account.-z
or--zone
: Specifies the zone to use for the operation.
Common Operations:
-
Create a new mailbox:
zmmailbox -a user1 -p password createMailbox user1
This creates a new mailbox for the user
user1
. -
Create a new folder:
zmmailbox -a user1 -p password createFolder user1/Inbox
This creates a new folder named
Inbox
in the mailbox of useruser1
. -
Move a message:
zmmailbox -a user1 -p password moveMessage user1/Inbox/12345 user1/Inbox/Archive
This moves the message with ID
12345
from theInbox
folder to theArchive
folder in the mailbox of useruser1
. -
Delete a message:
zmmailbox -a user1 -p password deleteMessage user1/Inbox/12345
This deletes the message with ID
12345
from theInbox
folder in the mailbox of useruser1
. -
Search for messages:
zmmailbox -a user1 -p password search -f "subject:hello"
This searches for messages with the subject
hello
in the mailbox of useruser1
. -
Export messages:
zmmailbox -a user1 -p password export -f "subject:hello" -o /path/to/export/file
This exports messages with the subject
hello
from the mailbox of useruser1
to a file at the specified path.
Additional Options:
-m
or--message
: Specifies the message ID or range of message IDs to operate on.-f
or--folder
: Specifies the folder to operate on.-o
or--output
: Specifies the output file or directory.-s
or--search
: Specifies the search query to use.
These are just a few examples of the many options and operations available with the zmmailbox
command. For more information, refer to the Zimbra documentation or the zmmailbox
command help output.