FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.
Knowledgebase: Email
Manual Commands for Working with Email (Advanced)
Posted on 31 May 2008 04:51 AM

For Advanced Users

This is a list of the commands for those clients who wish to work with email accounts from the command line (SSH) or for clients to utilize in scripts in order to bypass the CNC. (For all users, the CNC Email Manager will provide information to you on your email accounts and will also allow you to easily configure autoresponders, forwarding aliases, and otherwise work with your email accounts.)

Note: We've provided some guides on usage and links to other resources for each command below and you can also use -h (or --help) with each command to obtain usage details and to see the optional flags.

Autoresponder API
fq-autoresponder
For viewing and working with autoresponders.
Usage:

To see what autoresponders are in place:
fq-autoresponder list
To see what the current autoresponder is set as on a particular email account:
fq-autoresponder get ACCOUNT
example: fq-autoresponder get joe
To show a log of the responses that have been sent within the last 7days:
fq-autoresponder log ACCOUNT
example: fq-autoresponder log joe
To delete an autoresponder:
fq-autoresponder drop ACCOUNT
example: fq-autoresponder drop joe
To set up or modify an autoresponder:
fq-autoresponder set ACCOUNT INCLUDE FROM-NAME FROM-ACCT SUBJECT MSG-LIMIT TIME-LIMIT < MSG-FILE
example: fq-autoresponder set joe Yes "Joe Doe" joe "Out of Office" 1 100000 < respondmsg.txt

Additional usage hints:
ACCOUNT is just the username portion of the email address.
INCLUDE needs to be set to either Yes or No to indicate whether or not the original email received should be included in the autoresponse.
FROM-NAME is the real name that should appear in the From header of the autoresponse (aka "Joe").
FROM-ACCT is the username portion of the email address that should appear in the From header of the autoresponse.
SUBJECT is used to set the Subject header of the autoresponse (example: "Out of Office").
MSG-LIMIT is the maximum number of responses that will be sent to any one sender in the TIME-LIMIT given. Default is 1. Maximum is 3.
TIME-LIMIT is the time limit in seconds for MSG-LIMIT. Default and minimum is 3600 seconds.
MSG-FILE is the name of the file that you have created which includes the content to be included in the body of the response. Note: The body of the response must be fed in on standard input for the 'set' command.
Additional resources:
[FQuest Announce] Remote Autoresponder Management Script
Other posts on "fq-autoresponder" from the FutureQuest Forums

Note: FutureQuest provides a remote autoresponder management script written in Python, RespondMGR, which can be referred to as a working example of using the fq-autoresponder commands in a script.
RespondMGR will only work with POP3 accounts (not alias or blackhole accounts), but the fq-autoresponder commands are not subject to that restriction.

Email Alias Tools
vaddalias
Add an email alias account.
Usage:
vaddalias [flags] username [address1 ... address10]
example: vaddalias sales "ted@example.com" "alf@example.net"
Additional resources:
Command Line Tool for Email Alias Modification?
[FQuest Announce] New Tools for Modifying Email Aliases
Other posts on "vaddalias" from the FutureQuest Forums
vchalias
Change an email alias account.
Usage:
vchalias [flags] username [address1 ... address10]
example: vchalias sales "fred@example.com" "alf@example.net"
Additional resources:
Command Line Tool for Email Alias Modification?
[FQuest Announce] New Tools for Modifying Email Aliases
Other posts on "vchalias" from the FutureQuest Forums
vdelalias
Delete an email alias account.
Usage:
vdelalias [flags] username
example: vdelalias sales
Additional resources:
Command Line Tool for Email Alias Modification?
[FQuest Announce] New Tools for Modifying Email Aliases
Other posts on "vdelalias" from the FutureQuest Forums
Other Email Tools
vauthenticate
Test authentication for a POP account.
Usage:
vauthenticate [flags] username
example: vauthenticate joe

After typing the command, hit enter. Then type the password for the email account and hit enter again. If the correct password was given, you should see output similar to the following:
UID=12345
GID=12345
USER=xdomain
HOME=/big/dom/xdomain
MAILDIR=./vmspool/username
VUSER=username
Additional resources:
Changing Email Passwords: With and Without the CNC
FQuest Announce: Email Password Management
vauthenticate and POPPass for PHP
Other posts on "vauthenticate" from the FutureQuest Forums
vpasswd
Change the password for a POP account.
Usage:
vpasswd [flags] username
example: vpasswd fred

After typing the command, hit enter. Then type the new password for the email account and hit enter again.
Additional resources:
Changing Email Passwords: With and Without the CNC
FQuest Announce: Email Password Management
vauthenticate and POPPass for PHP
Other posts on "vauthenticate" from the FutureQuest Forums
listvdomain
List your email accounts.
Usage:
listvdomain [flags]
listvdomain [flags] username1 username2
example: listvdomain
example: listvdomain fred lucy

If no username is given, information for all email usernames under the account will be listed, one mail account name per line.

If username(s) are supplied in the command, only the information for those accounts will be listed.

listvdomain outputs lines in the form of:
USER MAILBOX ALIASES
where "USER" is the mail username, "MAILBOX" is the path to the mailbox directory (marked with either "-" or "(disabled)" for aliases), and "ALIASES" is a list of zero or more addresses to which mail is forwarded.

For example, you may see:
joe ./vmspool/joe (a POP/IMAP account)
blackhole ./vmspool/blackhole(disabled) (for a blackhole account)
contact ./vmspool/contact(disabled) sales@example.com (for a forwarding alias)
staff ./vmspool/staff(disabled) joe@example.com jill@example.com (for a forwarding alias stack)
php - yourshell (a system account set up to forward to your shell -- see this link for other system email addresses that are added to all accounts by default)

Additional resources:
[FQuest Announce] New Tools for Modifying Email Aliases
Other posts on "listvdomain" from the FutureQuest Forums
vdu
Display the number of messages (new, unread, read) and the disk usage information for email accounts.
Usage:
vdu [flags]
vdu [flags] username1 username2
example: vdu
example: vdu fred lucy

If no username is given, information for all email usernames under the account will be listed, one mail account per line.

If username(s) are supplied in the command, only the information for those accounts will be listed.

For example, you may see:
fred 1 4 0 0 0 0 20 (this would be a POP/IMAP account)
lucy(disabled) 0 0 0 0 0 0 16 (this would be a forwarding alias)

Each line from vdu contains the following items:
1. The virtual username (with a notation of "-" or "(disabled)" for aliases)
2. The number of new messages
3. The number of kiloBytes in new messages
4. The number of unread messages
5. The number of kiloBytes in unread messages
6. The number of read messages
7. The number of kiloBytes in read messages
8. The number of kiloBytes in overhead files (all accounts will have overhead)

See below for definitions of New, Unread, and Read email:

New messages are messages that have not yet been downloaded or accessed in any manner.

Unread indicates email that has been accessed using, for example, SSH or POP3 Scan Mailbox, where the headers are downloaded, but the message bodies themselves are not.

Read messages are copies of messages left on the server after you have downloaded the email.

Supplying "-a" or "--all" as a flag will result in each IMAP folder being shown as well. Each IMAP folder has the same format as the base account.

For example, issuing the command:
vdu -a imapbox
will show the details for the imap folders under the imapbox:
imapbox 0 0 0 0 1 4 40 Drafts 0 0 0 0 0 0 20 Trash 0 0 0 0 0 0 28 Sent 0 0 0 0 1 4 28

Additional resources:
Forum post from FutureQuest's mailadmin regarding vdu
Other posts on "vdu" from the FutureQuest Forums