Mail Autoresponders: autoresponder Utility

The autoresponder utility is used to manage mail autoresponders through CLI. By using this utility, you can perform the following tasks:

Syntax

autoresponder <command> <autoresponder name> [

<option_1> [<param>]

[<option_2> [<param>]]

…[<option_N> [<param>]]

]

Example

The following command line creates and enables autoresponder named AutoReply for Plesk mail name admin@example.com, sets the text "Thank you for your inquiry. The application form is attached." and the subject line "application form" for the automatic reply message, attaches to the message file applicationform.txt from the autoresponders attachment file repository.

# ./autoresponder --create Autoreply -mail admin@example.com -status -true -attach applicationform.txt -subject "application form" -text "Thank you for your inquiry. The application form is attached."

Commands

Command

Parameter

Description

Example

--create or -c

<autoresponder name>

Creates a mail autoresponder.

To create mail autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder --create Autoreply -mail admin@example.com

or

# ./autoresponder -c AutoReply -mail admin@example.com

--update or -u

<autoresponder name>

Updates autoresponder settings.

To specify subject line "An autoreply message" for existing mail autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder --update AutoReply -mail admin@example.com - subject "An autoreply message"

or

# ./autoresponder -u AutoReply -mail admin@example.com - subject "An autoreply message"

--remove or -r

<autoresponder name>

Deletes a mail autoresponder.

To delete mail autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder --remove Autoreply -mail admin@example.com

or

# ./autoresponder -r AutoReply -mail admin@example.com

--on

<domain name>

Enables all autoresponders on a specified Plesk mail name.

To enable all existing autoresponders for Plesk mail name admin@example.com:

# ./autoresponder --on example.com

--off

<domain name>

Disables all autoresponders on a specified Plesk mail name.

To disable all existing autoresponders for Plesk mail name admin@example.com:

# ./autoresponder --off example.com

--attachments or -a

 

Adds ot deletes files from a mail name's autoresponder attachment files repository (Autoresponders > Attachment Files).

Used in conjunction with the -files option.

To add files /usr/local/sampleschedule.txt and /usr/local/applicationform.txt to the autoresponder attachment files repository for Plesk mail name admin@example.com:

# ./autoresponder --attachments -mail admin@example.com -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt

or

# ./autoresponder -a -mail admin@example.com -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt

--info or -i

<autoresponder name>

Displays information about a mail autoresponder.

Used in conjunction with the -mail option.

To display information about autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder --info AutoReply -mail admin@example.com

or

# ./autoresponder -i AutoReply -mail admin@example.com

--help or -h

 

Displays help on the use of the utility.

To display help on the use of the autoresponder utility:

# ./autoresponder --help

or

# ./autoresponder -h

Options

Option

Parameter

Description

Example

-mail

<mail name>

Sets the name of an autoresponder (the Autoresponder name parameter) for a specified Plesk mail name.

To create mail autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder -c AutoReply -mail admin@example.com

-redirect

<e-mail address>

Specifies an e-mail address for an autoresponder to which incoming mail will be forwarded to upon automatic reply using the autoresponder (the Upon automatic response, forward the original message to the specified e-mail parameter).

To set up forwarding to e-mail address traveladmin@example.net for incoming messages for Plesk mail name admin@example.com that are automatically replied to by using autoresponder AutoReply:

# ./autoresponder -u AutoReply -mail admin@example.com -redirect traveladmin@example.net

-status

true | false

Enables or disables an autoresponder. Is set to false by default.

To enable autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com status true

-requires

always

or

subj|body:<string>

Specifies the condition under which an autoresponder will act (the Specify the condition for this automatic reply parameter):

always - the always respond option; when enabled, the autoresponder will always be used to reply to incoming messages.

subj:<string> - the when specified words are found in message subject option; when enabled, the autoresponder will be used to reply to an incoming message only if the message subject line contains the <string> pattern.

body:<string> - the when specified words are found in the message body option; when enabled, the autoresponder will be used to reply to an incoming message only if the message body line contains the <string> pattern.

To set up automatic replying to messages delivered to Plesk mail name admin@example.com using autoresponder AutoReply only when an incoming message subject line contains the "information request" pattern:

# ./autoresponder -u AutoReply -mail - admin@example.com -requires subj:"information request"

subject

<string>

Specifies the subject line of the automatic reply message for an autoresponder (the Reply subject parameter). Is set to Re: <request_subject> by default. In the reply message, the <request_subject> portion will be replaced with the incoming message subject line.

To set the subject line of the automatic reply message to Administration policy manual for autoresponder Autoreply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com -subject "Administration policy manual"

-replyto

<string>

Specifies the reply-to address in an autoresponder's automatic reply message (the Return address parameter).

To set the reply-to address of the automatic reply message to traveladmin@example.net for autoresponder Autoreply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com -replyto traveladmin@example.net

-text

<string>

Specifies an autoresponder's automatic reply message body text (the Reply with text parameter).

To set the automatic reply message body text to "Thank you for your inquiry. Administrator will contact you shortly." for autoresponder Autoreply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com -text "Thank you for your inquiry. Administrator will contact you shortly."

-format

plain | html

Specifies the format (Plain or HTML) of an autoresponder's automatic reply message (the Mail sending format parameter).

To send automatic reply messages in the HTML format by using autoresponder Autoreply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com -format html

-charset

<string>

Specifies the charset used to encode autoresponder's automatic reply messages (the Encoding parameter).

To use the UTF-8 charset to encode automatic reply messages of autoresponder Autoreply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com -charset UTF-8

-store

<number>

Sets the maximum number of unique e-mail addresses for which the daily reply quota (set by the -frq option, the Reply to the unique e-mail address not more than / times a day parameter) is enforced by an autoresponder (the Store up to / unique e-mail addresses parameter).

To set up enforcing the daily reply quota for up to 200 of unique e-mail addresses for autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder -u AutoReply -mail admin@example.com -store 200

-attach

add|del:<file name>[,<file name 1>,...,<file name N>]

Adds or removes files to be attached to an autoresponder's automatic reply message (Attachments). Only files that are already added to the Plesk mail name's attachment files repository can be added to the autoresponder's attachments.

Used only with the --create and --update commands.

To add files sampleschedule.txt and applicationform.txt from the attachment files repository to the autoresponder AutoReply for Plesk mail name admin@example.com:

# ./autoresponder -u -mail admin@example.com -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt

-frq

<number>

Sets the maximum number of replies that can be sent to a specific e-mail address on a given day (the Reply to the unique e-mail address not more than / times a day parameter).

 

Sets the maximum number of replies that can be sent to a specific e-mail address on a given day by using autoresponder AutoReply for Plesk mail name admin@example.com to 5:

# ./autoresponder -u AutoReply -mail admin@example.com -frg 5

-files

add|del:<file name>[,<file name 1>,...,<file name N>]

Specifies files to be added or deleted from mail name's autoresponder attachment files repository. Is to be used only with the --attachments command. Is required by the --attachments command.

When adding files to the repository, <file name> in the option argument must include the full path to the file.

When deleting files from the repository, <file name> must include only the file name.

To add files /usr/local/sampleschedule.txt and /usr/local/applicationform.txt to the autoresponder attachment files repository for Plesk mail name admin@example.com:

# ./autoresponder -a -mail admin@example.com -files add:/usr/local/sampleschedule.txt,/usr/local/applicationform.txt