This command allows administrators to specify custom mail templates to use when using the "verify" mode of nickname registration. There are 6 different types of templates.
The type can be one of the following:
register: This template is used when sending new nickname registration e-mails
verify: This template is used when a user attempts to verify an existing registration
drop: This template is used when a user attempts to drop a nickname
email-change: This template is used when a user tries to change the e-mail for an already registered nickname
passwd-change: This template is used when a user tries to change the password for an already registered nickname
passwd-request: This template is used when an oper issues a "SENDPASS" command for a registered nickname.
/as services set template verify verify.tem
The filename is optional. It is relative to the root of the CR install, so if you have your file in db/mail/templates you should use "db/mail/templates/mymailtext.txt" as the filename used. If it is not specified, services will use a default mail template.
The template files use the same syntax as web server files. You can have replacement variables, which are enclosed in % signs (e.g. %req_nick%) or text. Structures like looping, or conditional text inclusion present in the web server are not available. The following variables are defined:
%%req_type%% This is expanded to a textual description of the type of request in English
%%req_email%% This is the e-mail address to which the e-mail was sent. Useful for adding custom headers at the bottom of the e-mail
%%req_nick%% This is the nickname for which this request was generated
%%req_time%% This is the time (in human-readable, RFC822 style) that this request will expire at. Always in GMT.
%%req_ts%% This is the time (as a number of seconds elapsed since midnight Jan 1, 1970) that this request will expire at.
%%req_ip%% This is the IP address (in dotted quad format) of the user that triggered this request. Will be 0.0.0.0 if the information is not available or not applicable.
%%rand_pass%% This is a random password that services can generate that can be included in e-mails as a sample. Useful for "SENDPASS" templates.
%%network%% This is the name of the network, as defined in /as services
%%%% A single %% sign.
You can have an unlimited number of replacement variables in each line, but the variable name, including the heading and trailing % sign cannot span multiple lines. The file formatting matters, as services uses it verbatim, except for the replacement of variables for their actual value. Unknown variables wil be expanded as themselves (e.g. %%foo%% expands to foo)
The template file path is relative to the CR install directory, so you should give a relative path, with the CR path being the implied root path. For example, if you have a template file in the "util/template" directory, you would specify the path as "util/template/mynickreg.template". No specific file extension is required, and templates can exist in any directory or subdirectory contained in the CR install directory.
Services includes template files which are included in the services executable file, and will be used by default, unless a configured differently.