CMD aliases

CmdAliases implement aliases that are handled only through commands and can be thought of as a user level implementation of custom domain processing commands. The command set is the same of the one that is described above (CUSTOM DOMAIN MAIL PROCESSING) and won't be explained again here.

For every handled domain (listed inside 'domains.tab') a directory with the same domain name is created inside the 'cmdaliases' subdirectory. This directory is automatically created and removed when you add/remove domains through the CTRL protocol (or 'CtrlClnt').

When a mail for 'USER@DOMAIN' is received by the server, the domain 'DOMAIN' is to be handled locally, and the standard users/aliases lookup fails, a file named 'USER.tab' is searched inside '$MAIL_ROOT/cmdaliases/DOMAIN'. If such file is found, commands listed inside the file (wich format must follow the one described in the previous section) are executed by the server as a matter of mail message processing. An important thing to remember is that all domain and user names applied to the file system, must be in the lower case.

The use of the command '[SMTP]' must be implemented with great care because it could create mail loops within the server.