System Variables And CommandsThis file contains the message with variables and commands that will be sent back. It can be either a plain text message or you can include attachments, make html messages or simply anything. Variables (Functions that return values): |
|||
%%From%% | - | whole From header of the message | |
%%From_Email%% | - | first email address from the From header | |
%%From_Alias%% | - | alias part of the first email address from the From header | |
%%From_Domain%% | - | domain part of the first email address from the From header | |
%%From_Name%% | - | name taken from the From header | |
%%To%% | - | whole To header of the message | |
%%To_Email%% | - | first email address from the To header | |
%%To_Alias%% | - | alias part of the first email address from the To header | |
%%To_Domain%% | - | domain part of the first email address from the To header | |
%%To_Name%% | - | name taken from the To header | |
%%Sender%% | - | sender of the message (whole content of MAIL FROM: command, even with < and >) | |
%%Sender_Email%% | - | email address of the sender (without < and >) | |
%%Sender_Alias%% | - | alias part of senders email address | |
%%Sender_Domain%% | - | domain part of senders email address | |
%%Auth_Email%% | - | email address of the authenticated user (without < and >), or empty if nobody authenticated | |
%%Auth_Username%% | - | username of the authenticated user (without < and >), or empty if nobody authenticated | |
%%Recipient%% | - | list of all recipients delimited with semicolon ((whole content of RCPT TO: commands, even with < and >) | |
%%BCC_Recipient%% | - | list of recipients not present in TO: or Cc: headers, delimited with semicolon ( even with < and >). If this variable is used in content filter during "copy incoming/outgoing mail" operation (using the "apply content filter" option), original email recipients are used, not the recipients where the message is being copied to. | |
%%Current_Recipient%% | - | email address of the current recipient - the address of the account being processed | |
%%Recipient_Email%% | - | email address of first recipient of the message | |
%%Recipient_Alias%% | - | alias part of email address of first recipient of the message | |
%%Recipient_Domain%% | - | domain part of email address of first recipient of the message | |
%%Extension%% | - | Extension of the recipient email address containing the extension separator | |
%%ExtensionNoSep%% | - | Extension of the recipient email address without separator | |
%%Subject%% | - | Subject of the message | |
%%Message-ID%% | - | Message-ID of the message (even with < and >) | |
%%Date%% | - | current date | |
%%Time%% | - | current time | |
%%Header%% | - | all headers of the message | |
%%Body%% | - | body of the message in plain text | |
%%Body MaxSize%% | - | body of the message in plain text limited to MaxSize | |
%%Body_HTML%% | - | body of the message in HTML (if any) | |
%%Body_HTML MaxSize%% | - | body of the message in HTML limited to MaxSize (if any) | |
%%Size%% | - | size of the message in kB | |
%%IP%% | - | IP address of the sender | |
%%UniqueID%% | - | Unique ID string (md5 random hash) | |
%%RFC822_Date%% | - | date and time of message arrival in RFC822 format, based on server time and GMT offset | |
%%AttachmentNames%% | - | names of the attachments delimited with semicolon Use rarely. Requires a high CPU usage and processing time. |
|
%%Header HeaderItem%% | - | particular message header. Eg: %%Header X-Mailer%% |
|
%%Include FileName%% | - | includes content of the filename. Please see the example at the end of this file | |
%%Include_Base64 FileName%% | - | includes filename in Base64 encoding. Please see the example at the end of this file | |
%%MessageFile%% | - | filename (.tmp or .imap file) storing actual content of the message | |
%%Copy HeaderItem Position Length%% | - | copy Length characters of HeaderItem from Position | |
%%Delete HeaderItem Position Length%% | - | delete Length characters of HeaderItem from Position | |
%%FormatDateTime Format%% | - | formated date of the message Eg: Today is %%FormatDateTime yyyy-mm-dd hh:nn:ss%% |
|
%%VirusName%% | - | name of the viruses delimited with semicolon | |
%%VirusDBDate%% | - | last update date of the database for AntiVirus engine | |
%%SpamScore%% | - | result of antispam filters | |
%%SpamReason%% | - | reason why message has been marked as spam | |
%%MailboxPath%% %%Mailbox%% %%Alias%% %%PhoneAlias%% | - | Account variables used only in certain places | |
%%InstallPath%% | - | Path to server installation directory | |
Commands:(These special extended variable commands work only for Auto Responders and Content Filter message actions) |
|||
$$SetSender Sender$$ | - | set sender of the message to some value | |
$$SetRecipient Recipient$$ | - | set recipient of the message to some value | |
$$SetActualTo To$$ | - | set To header to some value | |
$$SetActualFrom From$$ | - | set From header to some value | |
$$SetSubject Subject$$ | - | set Subject to some value | |
$$SetReplyTo ReplyTo$$ | - | set ReplyTo header to some value | |
$$SetMessageID MessageID$$ | - | set MessageID to some value | |
$$SetPartBoundary PartBoundary$$ | - | set Boundary (used for messages with attachment, see the example at the end of this file) | |
$$SetContentType ContentType$$ | - | set Content Type of particular Boundary (see the example at the end of this file) | |
$$SetHeader Header$$ | - | set some header to some value | |
Example #1 (Simple Auto Responder): |
|||
Hello, I received your your message at %%Time%% on the %%Date%% and the size was %%Size%% kB. | |||
Example #2 Advanced Auto Responder With An Attachment:Works only for Content Filters with "Send message" or "Reply with message" actions(not for normal AutoResponders, because of security) |
|||
$$SetSubject Message Subject: %%Subject%%$$ $$SetPartBoundary --BoundaryXX$$ ----BoundaryXX Content-Type: text/plain This is the text part of the message. The following part contains an attachment image. ----BoundaryXX Content-Type: application/octet-stream; name="image.gif" Content-Transfer-Encoding: base64 %%Include_Base64 c:\temp\image.gif%% ----BoundaryXX |
|||
Example #3 (Message containing only attachment):Works for Content filters only |
|||
$$SetHeader Content-Type: application/octet-stream; name="filename.ext"$$$$SetHeader Content-Transfer-Encoding: base64$$ %%Include_Base64 d:\daily.txt%% | |||
Example #4 (Virus Warning): |
|||
Warning: Virus '%%VirusName%%' detected. Message was rejected. Message's header: %%Header%% |