From d92c9fe71b5ca69168381a40c221cf419c40eafa Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 21 Oct 2003 02:23:24 +0000 Subject: [PATCH] Updated for internal support of JavaScript mail processors. --- ctrl/mailproc.cfg | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/ctrl/mailproc.cfg b/ctrl/mailproc.cfg index f31306ed09..22665e1bf2 100644 --- a/ctrl/mailproc.cfg +++ b/ctrl/mailproc.cfg @@ -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 -- GitLab