Skip to content
Snippets Groups Projects
Commit d92c9fe7 authored by rswindell's avatar rswindell
Browse files

Updated for internal support of JavaScript mail processors.

parent c668b92e
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,12 @@
; SMTP mail message.
;
; These instructions are for the Synchronet Mail Server (mailsrvr.c)
; revision 1.289 and later.
; revision 1.298 and later.
;
; Command-line Specifiers
; ~~~~~~~~~~~~~~~~~~~~~~~
;
; Mail processor command-lines use command-line specifiers (i.e. macros
; Mail processor command-lines may use command-line specifiers (i.e. macros
; or variables) to represent dynamic information.
;
; Command-line specifiers (macros/variables) available:
......@@ -110,6 +110,37 @@
; RecipientNetType=4
; RecipientNetAddr=FREEBSD
;
; JavaScript Mail Processors
; ~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; If a mail processor command-line begins with '?', the JavaScript module
; following the '?' (assumed to be located in the Synchronet EXEC directory)
; will be compiled and executed internally. Any command-line options
; included after the filename will be available to the script using the
; 'argv' array.
;
; You can still use the command-line specifiers to pass dynamic information
; to a JavaScript mail processor, but all the same information is more easily
; accessible by accessing built-in JavaScript objects/properties:
;
; The message text filename (%m) is available to JavaScript modules using
; the global variable 'message_text_filename'.
;
; The recipient list filename (%l) is available to JavaScript modules using
; the global variable 'recipient_list_filename'.
;
; The processing error filename (%e) is available to JavaScript modules using
; the global variable 'processing_error_filename'.
;
; The sending SMTP server's host name (%h) is available to JavaScript modules
; using the 'client.host_name' property.
;
; The sending SMTP server's IP addrses (%i) is available to JavaScript modules
; using the 'client.ip_address' property.
;
; See the example JavaScript mail processor (mailproc_example.js) in your
; Synchronet EXEC directory for more details.
;
; Mail Processing commands follow:
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
......@@ -117,4 +148,4 @@
;
; echo This is a sample mail process command. >> %m
; grep -i penis %m > %e
; %!jsexec somescript %m %l %e
\ No newline at end of file
; ?mailproc_example.js
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment