; mailproc.ini

; External Mail Processing Configuration

; $Id$

; In Synchronet v3.11 and earlier, this file was named mailproc.cfg with a
; slightly different (and less flexible) format.

; Each mail processor is specified in a separate "section", comprised of the
; mail processor name (or command-line) enclosed in square brackets ("[]"), 
; followed by a list of optional "key = value" pairs.

; If no "Eval" or "Command" key value is specified, the mail processor name
; will be used as the command-line to execute.

; Non-JavaScript mail processors (i.e. native executables), must have the 
; "native" key set to "true" (e.g. "native = true").

; For a mail processor to only process mail received for specific name(s),
; it must have a "To" key with a comma-separated list of destination names.
; Example: "To = listserver, listserv" would cause a mail processor to only
; process mail received for either "listserver" or "listserv".
; If no "To" value is specified, then the mail processor will process *all*
; incoming (SMTP) e-mail messages.
; If a "To" value is specified, but is not a valid user name, then the 
; "PassThru" key must be set to "true" or the mail may be rejected or
; forwarded (depending on the system configuration).

; The "From" key is similar to the "To" key:
; a list of zero or more strings to be used to determine which 
; sender addresses the mail processor should be executed for.

; Each of the strings in these lists may use the Synchronet .can-style wildcards.

; The filenames referenced below may all be modified or created by the mail processor.

; Additional (read-only) variables available to JavaScript mail processors:
;
;     message_text_filename		// filename contains complete message header and body
;     new_message_text_filename         // completely new message header and body (optional)
;     recipient_list_filename		// list of all SMTP recipients for this message (.ini format)
;     processing_error_filename		// a filename that if created will reject this message with an SMTP error
;     log_text_filename                 // an optional filename that if created will include debug log output
;     hello_name			// the "HELO" name specified by the sender during the SMTP session
;     sender_name			// the name of the sender, possibly the same as the sender_address
;     sender_address			// sender's email address (e.g. "user@domain.com")
;     reverse_path			// sender's SMTP reverse-path from SMTP envelope (e.g. "<user@domain.com>")
;     recipient_address			// last specified recipient in SMTP session (e.g. "you@your.host.com")
;
;     See exec/mailproc_util.js and exec/listserver.js for example uses.

; JavaScript mail processors may be implemented as either a single "Eval"
; string or an external JavaScript file (e.g. *.js).

; External JavaScript mail processors (.js files) are loaded from the "mods"
; or "exec" directory if no path is specified on the command-line. 
; If no file extension is specified on the command-line, ".js" is assumed.

; Command-line specifiers (variables) available for use in command-lines
; (native or JavaScript mail processor):
;
;     %m mail message (header and body text) path/filename
;     %n new message (header and body text) path/filename, in case you can't modify the original
;     %l recipient list path/filename
;     %e processing error path/filename (put error text in this file)
;     %d processing debug log output path/filename
;
;     %h sender's host name
;     %i sender's IP address
;     %s sender's name
;     %a sender's address
;     %u sender's user number (0 if unauthenticated)
;     %r reverse path (of SMTP "envelope")
;     %t recipient's address (from SMTP "envelope")
;
;     %! exec dir
;     %g temp dir
;     %j data dir
;     %k ctrl dir
;     %z text dir
;
;     %o sysop name
;     %q system QWK-ID
;     %v Synchronet version
;     %? platform
;     %% percent symbol

; Supported keys (for each mail processor) with default values:
; Disabled = false
; PassThru = true
; Native = false
; IgnoreOnError = false
; To = <none>
; From = <none>
; AccessRequirements = <none>
; ProcessSPAM = true
; ProcessDNSBL = true
; Command = [section_name]
; Eval = <none>

[MailAuth]
	Command=mailauth.js
	AccessRequirements=user equal 0 or guest
	Disabled=false

[ListServer]
	Command=listserver.js
	To=listserver, listserv
	PassThru=false
	Disabled=false