If a message that has as target domain of 'sub1.sub2.domain.net' arrives at the AfterLogic XMail Server server, 'AND' AfterLogic XMail Server does not have a real domain 'sub1.sub2.domain.net' inside its domain list, AfterLogic XMail Server decides if this domain gets a custom domain processing by trying to lookup:
sub1.sub2.domain.net.tab .sub2.domain.net.tab .domain.net.tab .net.tab .tab
inside the 'custdomains' directory.
If one of these files is found, the incoming mail gets custom domain processing by executing commands that are stored in such a file.
The format is:
"command"[TAB]"arg-or-macro"[TAB]...[NEWLINE]
These tables store commands (internals or externals) that have to be executed on the message file. The presence of one of these files is optional and if none exist the default processing is applied to the message via SMTP.
Each argument can be a macro also (see [MACRO SUBSTITUTION]):
the sender of the message
the target of the message
the message file path (the external command 'must only read' the file)
the (AfterLogic XMail Server unique) message id
the reference SMTP message id
copies the message file into a temporary one. It can be used with 'external' command but in this case it's external program's responsibility to delete the temporary file
name of the SMTP authenticated user, or ``-'' if no authentication has been supplied
Supported commands:
"external"[TAB]"priority"[TAB]"wait-timeout"[TAB]"command-path"[TAB]=> "arg-or-macro"[TAB]...[NEWLINE]
where:
command keyword
process priority: 0 = normal -1 = below normal +1 = above normal
wait timeout for process execution in seconds: 0 = nowait
Be sure while using $(FILE) that the external command has enough time to be completed, otherwise the file will be removed by AfterLogic XMail Server during the command processing. This is because such file is a temporary one that is deleted when AfterLogic XMail Server exits from file processing. In case is the external command exit code will be '16', the command processing will stops, and all the following commands listed inside the file will be skipped.
"filter"[TAB]"priority"[TAB]"wait-timeout"[TAB]"command-path"[TAB]=> "arg-or-macro"[TAB]...[NEWLINE]
where:
command keyword
process priority: 0 = normal -1 = below normal +1 = above normal
wait timeout for process execution in seconds: 0 = nowait
With filters, it is not suggested to use $(TMPFILE), since the filter will not be able to change the message content in that way. Also, to avoid problems very difficult to troubleshoot, it is suggested to give the filter 'ENOUGH' time to be completed (90 seconds or more). See [MESSAGE FILTERS] for detailed information about return codes. In the filter command, the ``Stop Filter Processing'' return flag will make AfterLogic XMail Server to stop the execution of the current custom processing file.
The 'filter' command will pass the message file to a custom external filter, that after inspecting it, has the option to accept, reject or modify it. Care should be taken to properly re-format the message after changing it, to avoid message corruption. The 'filter' command CANNOT successfully change the private AfterLogic XMail Server's header part of the spool message.
"redirect"[TAB]"domain-or-emailaddress"[TAB]...[NEWLINE]
Redirect message to internal or external domain or email address. If the message was for foo-user@custdomain.net and the file custdomain.net.tab contains a line:
"redirect" "target-domain.org"
the message is delivered to 'foo-user@target-domain.org'.
While the line:
"redirect" "user@target-domain.org"
redirects the message to user@target-domain.org.
"lredirect"[TAB]"domain-or-emailaddress"[TAB]...[NEWLINE]
Redirect the message to internal or external domain (or email address) impersonating local domain during messages delivery. If the message was for foo-user@custdomain.net and the file custdomain.net.tab contains a line:
"redirect" "target-domain.org"
the message is delivered to 'foo-user@target-domain.org'.
While the line:
"redirect" "user@target-domain.org"
redirects the message to 'user@target-domain.org'. The difference between ``redirect'' and ``lredirect'' is the following. Suppose A@B sends a message to C@D, that has a redirect to E@F. With ``redirect'' E@F will see A@B has sender while with ``lredirect'' he will see C@D.
"smtprelay"[TAB]"server[:port][,options];server[:port][,options];..."[NEWLINE]
Send mail to the specified SMTP server list by trying the first, if fails the second and so on. Otherwise, you can use this syntax:
"smtprelay"[TAB]"#server[:port][,options];server[:port][,options];..."[NEWLINE]
to have AfterLogic XMail Server random-select the order of the specified relays. Each gateway definition can also contain options as the comma-separated list (see [SMTP GATEWAY CONFIGURATION] for more information).
"smtp"[NEWLINE]
Do SMTP delivery.
[top]