Previous Topic

Next Topic

Book Contents

Managing Mail Accounts With Mail.exe Utility

Mail.exe utility allows you to manage mail accounts. Using this utility, you can:

Mail.exe is located in %plesk_dir%admin\bin\. Available commands and options are listed in tables below.

Usage:
mail.exe command <mail_name> [options]

Example of usage:
mail.exe --create johndoe@domain1.com -passwd "MyPass" -cp_access false -mbox_quota 20 -antivirus inout

Available commands:

Command

Parameter

Action

Example

--create or -c

<mail_name>@<domain>

creates a mail account

To create e-mail account for John Doe on Somewhere.com domain:

./mail.exe -create John_Doe@somewhere.com or

./mail.exe -c John_Doe@somewhere.com

--update or -u

<mail_name>@<domain>

updates mail account parameters

Examples of updating various mail account parameters are provided further down this table

--remove or -r

<mail_name>@<domain>

removes a mail account

To remove e-mail account of John Doe on Somewhere.com domain:

./mail.exe --remove John_Doe@somewhere.com or

./mail.exe -r John_Doe@somewhere.com

--on

<domain>

enables mail service for a domain

To enable mail service for Somewhere.com domain:

./mail.exe --on somewhere.com

--off

<domain>

disables mail service for a domain

To disable mail service for Somewhere.com domain:

./mail.exe --off somewhere.com

--info or -i

<mail_name>@<domain>

retrieves mail account information

To retrieve information about John_Doe@somewhere.com mail account:

./mail.exe --info John_Doe@somewhere.com

--help or -h

 

displays help on the utility usage

To see help file for mail.exe utility

./mail.exe --help or

./mail.exe --h

Available options:

Option

Parameter

Action

Example

-cp_access

<true|false>

enables control panel access

To enable control panel access to John_Doe@somewhere.com email account:

./mail.exe --update John_Doe@somewhere.com -cp_access true

-mailbox

<true|false>

creates/removes a mailbox

To remove John_Doe mail box:

./mail.exe --update John_Doe -mailbox false

-passwd

<passwd>

sets a mailbox password

To set mailbox password, JD_password, for John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -passwd JD_password

-boxpass

<passwd>

obsolete alias for option "passwd" (this option may be removed from future releases)

To set mailbox password, JD_password, for John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -boxpass JD_password

-mbox_quota

<KB>

limits the mailbox quota to the desired amount

To limit mail box quota for John_Doe@somewhere.com mail box to 500Kb:

./mail.exe --update John_Doe@somewhere.com -mbox_quota 500

-boxquota

<KB>

obsolete alias for option "mbox_quota" (this option may be removed from future releases)

To limit mail box quota for John_Doe@somewhere.com mail box to 500Kb:

./mail.exe --update John_Doe@somewhere.com -boxquota 500

-aliases

<add|del>:<name1[,name2]>

adds or deletes mail alias(es) to/from a mail name

To add JD, John_D mail alliases to John_Doe@somewhere.com mail name:

./mail.exe --update John_Doe@somewhere.com -aliases add: JD, John_D

-mgroups

<add|del>:<list1[,list2]>

adds or removes a mail name to/from a mail group

To remove John_Doe@somewhere.com from 'Partners' mail group:

./mail.exe --update John_Doe@somewhere.com -mgroups del: Partners

-redirect

<true|false>

switches mail redirect on/off

To switch on mail redirect for John_Doe@somewhere.com mailbox and to set redirect address - John_Doe@redirect.com:

./mail.exe --update John_Doe@somewhere.com -redirect true -rediaddr John_Doe@redirect.com

-rediraddr

<addr>

sets redirect to an address (required if redirect is enabled)

To set redirect address John_Doe@redirect.com, when redirect is enabled:

./mail.exe --update John_Doe@somewhere.com -redirect true -rediaddr John_Doe@redirect.com

-group

<true|false>

switches a mail group on/off

To switch off John_Doe@somewhere.com mail group:

./mail.exe --update John_Doe@somewhere.com -group false

-groupmem

<add|del>:<addr1[,addr2]>

adds/removes address(-es) to/from a mail group

To add Address1@doman.name to John_Doe@somewhere.com mail group:

./mail.exe --update John_Doe@somewhere.com -groupmem add: Address1@domain.name

-repo

<add|del>:<file1[,file2]>

adds/removes file to/from attachments repository; full path to file needs to be specified, if the file is located in folder other than %plesk_dir%admin\bin\

To add attach.zip located in c:\my files to attachments repository of John_Doe@somewhere.com:

./mail.exe --update John_Doe@somewhere.com -repo add: "c:\my files\attach.zip"

-autorsp

<true|false>

switches all autoresponders on/off

To switcn autoresponders on:

./mail.exe --update John_Doe@somewhere.com -autorsp true

-autoname

<name>

autoresponder name (required for all autoresponder options)

See below for examples

-autostatus

<true|false><subj|body>:<string> or <always>

switches on/off autoresponder with specified name (default: true)

To switch on autoresponder named "JD_autoresponder" for John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autostatus true

-autoreq

<subj|body>:<string> or <always>

defines the condition for the autoresponder to be activated whether the specified pattern is encountered in the subject or body, or to respond always

To respond to e-mails containing pattern "Need help" in the e-mail subject for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autoreq subj:"Need help"

-autosubj

<original|string>

the subject line to be placed into autoresponder ("Re: <incoming subject>") or a custom string

To respond with e-mail subject "Help information" for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autosubj "Help information"

-auto_replyto

<string>

return address that will be placed into the autoresponder's messages

To change the return address to "helpserver@somewhere.com" for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -auto_replyto "helpserver@somewhere.com"

-autotext

<string>

autoresponder message text

To change the autoresponder message text to "Thank you for your inquiry" for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autotext "Thank you for your inquiry"

-autoatch

<add|del>:<file1[,file2]>

adds/removes autoresponder attachment files; full path to file needs to be specified, if the file is located in folder other than %plesk_dir%admin\bin\

To add attach.zip located in c:\my files to messages of autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autoatch add:"c:\my files\attach.zip"

-autofrq

<number>

defines the maximum number of responses to a unique e-mail address per day

To set the maximum number of responses to unique e-mail address to 5 per day for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autofrg 5

-autostor

<number>

defines the number of unique addresses to be stored for autoresponder

To set the number of unique addresses to be stored to 10 for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autostor 10

-autored

<addr>

defines the e-mail address to forward all incoming mail to

To forward all incoming mail to "help@somewhere.com" for autoresponder named "JD_autoresponder" on John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe -autoname "JD_autoresponder" -autored "help@somewhere.com"

-multiple-sessions

<true|false>

enables multiple sessions

To enable multiple-sessions:

./mail.exe --update John_Doe@somewhere.com -multiple-sessions true

-antivirus

<off|inout|in|out>

 

manages antivirus check for mail traffic. Disables it, sets it for incoming and outgoing mail, for incoming mail only or for outgoing mail only

To set antivirus to check all mail messages sent to John_Doe@somewhere.com mailbox:

./mail.exe --update John_Doe@somewhere.com -antivirus in

See Also

Creation Utilities

Configuring Server With Init_conf.exe Utility

Changing Control Panel Appearance With Server_pref.exe Utility

Managing IP Addresses With Ipmanage.exe Utility

Client Account Management With Client.exe and Client_pref.exe Utilities

Managing Domains With Domain.exe and Domain_pref.exe Utilities

Managing Web Users With Webuser.exe Utility

Managing Databases With Database.exe Utility

Managing Mailing Lists With Maillist.exe Utility

Managing Spam Filtering With Spamassassin.exe Utility

Managing Web Protection For Domain Directories With Protdir.exe Utility

Managing Anonymous FTP Service With Anonftp.exe Utility

Managing Subdomains With Subdomain.exe Utility