Other config files - see files.txt for formats
==================

allow_deny_file
---------------
The file containing the IP addresses for machines that
are allowed/denied connections. See files.txt for the
format of this file.
There is no default.

schedule_file
---------------
The file that lists the RAS entries to use and when to dial
them. It can also be used for time-specific LAN connections.
There is no default. See files.txt for the format of this file

logfile
-------
This sets the name of the log-file. 
Default is jsmail.log

error_logfile
--------------
This sets the name of the error log-file. 
Default is errors.log

subject_file
------------
When retrieving mail from a POP3 account, JSMail can determine the
destination based on the subject of the mail. The destination is found
from a mapping given in this file. See files.txt for the format.
There is no default.

passwords
---------
The name of the password file.
There is no default.

audit_log
---------
The name of a file to which to keep a log of all mails that pass
through the server. The entries will give the date/time the mail
was routed, its size, who if was from and who it was to.
There is no default.



General JSMail configuration settings
=====================================

scheduler
----------
Whether or not to start the connection scheduler.
The default is yes.

ras_timeout
-----------
The time in seconds to wait after dialing to assume that the connection
attempt has failed. 
The default is 60 seconds
 
ras_hup_when_done
-----------------
Whether or not to hang-up the connection after all mails have been
sent/retrieved. If non-zero, the number of seconds to wait after 
completion before hanging up, if zero, do not hang up.
The default is 0

ras_takeover
------------
Whether or not to 'take-over' an already connection RAS entry when it
matches the one being dialed. That is, behave as if JSMail had initiated
the connection.

return_receipts
---------------
Whether or not to automatically return receipts to mails where this
is requested. 
The default is yes

rcpt_subject
------------
The subject line in returned receipts.
Defaults to "Mail Delivery Receipt"

rcpt_message
------------
The message that starts the body of a receipt message. If this text
contains the string %user%, it is replaced with the name of the
destination of the original mail.
Defaults to 

    "This is an automatically generated message.\r\n\r\n    
     Receipt of mail to: %user%"

bind_address
------------
Bind this instance of JSMail to the given IP address. This is
useful to run several copies of JSMail on a multi-homed machine.
Default is INADDR_ANY ( ie all addresses belonging to this machine).

nameserver
----------
The IP address of a nameserver to use to resolve MX records. This
is only used if smtp_client_mode is 0.
There is no default.

dns_timeout
-----------
The time_out to use when trying to get MX records.
Default is 10 seconds.

log
---
This controls how much information is logged to the console screen
as things happen. There are various levels ( 0 - 5 ). A setting of 0 
will result in no screen output.
Default is 0.

log_to_file
-----------
This controls whether or not activities are logged to a file. There
are various levels ( 0 - 5 ).
Default is 0.

date_format
-----------
This sets the format of the date strings in the various mail headers.
The possible values are 1, 2 or 3
    1 is     Mon, 10 April 97 15:23:37 GMT +0000
    2 is     Mon, 10 April 97 15:23:37 +0000
    3 is     Mon, 10 April 97 15:23:37 +0000 (GMT)

The default is 2.

shutdown_timeout
----------------
Normally when you enter 'exit' at the prompt, JSMail will wait 
for all the running threads to finish cleanly before exiting. You
can override this by hitting 'ESC'. This is the time that JSMail
will wait for the threads to finish before shutting down anyway.
The default value is 20 (seconds).

remote_port
--------------
The tcp port to which the remote-command server is to listen on. 
Default is 23 (telnet).

remote_control
--------------
Whether or not to start the remote control server. 
Default is yes.

pass_server
-----------
This controls whether or not the change-password listener is started
0 means do not start.
Default is yes.

local_router
------------
This controls whether or not the internal router is started. It routes mail
between the queue and either local users or the outbox. It should normally 
be set to start. 0 means do not start.
Default is yes.

router_wait
-----------
This controls how often to check the queue for mails to be routed.
Default is 10.

smart_host
----------
The name of the smarthost (the mail server of your ISP). You
can optionally follow the name with a colon and a number to
specify the port number. Eg smtp.myisp.com:25
There is no default.

local_domain
------------
The main domain for which this machine is to handle mail. Usually
the local domain name. ( eg. mycompany.com )
Defaults to be the same as local_machine.

local_machine
-------------
The real name of this machine. eg. mail.mycompany.com
If no value is specified, defaults to the name returned by the system.

local_domain_alias
------------------
An alternative to the name given by local_domain. It could be the
machine name for which this machine also handles mail, the actual 
node name provided by your ISP or other domains you have registered
for mail-forwarding with your ISP.
You can have any number of these entries.

queue
-----
The directory for mail waiting to be routed (the queue).
Defaults to the current directory.

mbox_root
---------
The root directory for all the maildrops
Defaults to the current directory.

outbound_mbox
-------------
The folder for outbound mail (the outbox).
There is no default.

default_user
------------
The user to whom mail should be delivered if the requested 
destination does not exist.
Default is 'postmaster'

rewrite_subject
---------------
If a mail gets redirected to the default user, the subject line
of the mail is re-written to include the intended destination
as well as the original subject. Setting this tag to no prevents
the rewrite. Eg a mail to an unknown user fred with a subject line
    Subject: Hello there
would be re-written as 
    Subject: REDIRECTED MAIL FOR fred (Hello there)
Default is yes.

pop3s_port
----------
The tcp port number to listen for pop3 connections on.
Default is 110.

smtps_port
----------
The tcp port number to listen for smtp connections on.
Default is 25.

password_port
-------------
The tcp port which the password-change server is to listen on.
Default is 5001.

finger_port
-----------
The tcp port number to connect to listen for finger connections on .
Default is 79.

reaper_timeout
--------------
The timeout for a connection that has had no activity - after this
time, the connection is terminated.
Default is 300 (5 minutes).

scan_users_every
----------------
The interval between automatic re-loads of the password in seconds. 
0 means don't automatically reload.
Default is 0.

audit
-----
Whether or not to log all mails that pass through the
server.
Default is no.


Relaying
========

relay_local_to_local
--------------------
Allow you to specify the name of an SMTP server to which to relay
ALL mail from ALL local users that is destined for another local user.
There is no default.

relay_local_to_remote
---------------------
Allow you to specify the name of an SMTP server to which to relay
ALL mail from ALL local users that is NOT destined for another 
local user.
There is no default.

relay_remote_to_local
---------------------
Allow you to specify the name of an SMTP server to which to relay
ALL mail from ALL non-local users that is destined for a local user.
There is no default.

relay_remote_to_remote
----------------------
Allow you to specify the name of an SMTP server to which to relay
ALL mail from ALL non-local users that is destined for another
non-local user.
There is no default.



SMTP settings
=============

rejects
-------
The name of a file containing addresses FROM which mails are
not accepted and/or subject lines cause a mail to be rejected. See 
files.txt for the format of the entries.
There is no default.

allow_nl_only
-------------
Allow lines that end in <LF> only rather than the usual SMTP standard
<CR><LF> pair.
Default is no.

local_only
----------
Whether or not the SMTP server reject mail to non-local destinations
from ANY host.
Default is no.

smtp_allow_forwarding
---------------------
This is a dotted-quad IP address ( * is allowed ), and is the 
address of a machine or machines that are on the local 
network. This is used by the SMTP server to determine whether 
forwarding will be allowed.
By default, all addresses are allowed.

pop3_allow_forwarding
---------------------
Whether or not the POP3 client will forward mail to non-local destinations.
Default is no.

route_single_unknown
--------------------
When a mail is destined for more than one unknown user in the local
domain, this determines whether just one copy of the mail is sent
to the default user or one for each unknown user.
Default is no (ie one  for each user).

reject_rbl_servers
------------------
If this is true, the server rejects connections from mail servers that
are listed in the RBL database. (see http://maps.vix.com/rbl/ ) If this
is yes.
Default is no.

lookup_source
-------------
As each incoming mail is processed, JSMail will look up the source IP 
address in an attempt to determine whether or not it is telling lies!
If it is, it is rejected. If this is no, the rbl_lookup value is ignored.
Defaults to no.

rbl_lookup
----------
As each incoming mail is processed, JSMail will look up the source host
using an RBL database. If it is listed, the mail is rejected. If this is
set, lookup_source will be set to yes. The value of this tag is the 
RBL server to use. Suggested servers are "rbl.dorkslayers.com" 
or "rbl.maps.vix.com". You can list as many RBL servers as you wish
up to 2000 characters.
There is no default.

smtp_limit
----------
The maximum size of a mail that the SMTP server will accept for delivery.
Default is 2147483647 octets. ( 2GB )

correct_251
-----------
Allows for dodgey mailers that don't accept the correct '251' reply
when sending mail that the server has to forward. If this is set to
zero, the reply will be 250, as if the mail were for a local destination
(it will still be forwarded though).
Default is no.

max_smtp_clients
----------------
How many simultaneous outgoing smtp connections to allow. Minimum is
one.
Default is 10.

try_send_days
-------------
This sets the number of days for which the SMTP client side of JSMail
will try to deliver a mail. After this time, if the mail has not been
delivered, it will be returned to the sender.
Default is 5 days.

smtp_server                
-----------
This controls whether or not the smtp server (listener) is started. 
This is used by clients and other servers to send mail. 
0 means do not start, 1 means start.
Default is yes.

smtp_client
-----------
This controls whether or not to try to send mail in the outbox to its intended
destination or not. If your mail system comunicates with the outside world, it
be set to yes ( start ).
Default is yes.

smtp_client_mode
----------------
This controls how to send mails to non-local destinations
0 = try to send direct to destination first using MX record lookup, 
    then try destination domain directly, then via smarthost
1 = send all non-local mails to smarthost only
2 = try to send direct to destination first using MX record lookup, 
    then via smarthost

Default is 0.

smtp_wait
---------
This controls the minimum waiting time that JSMail waits before
trying to send outgoing mails after the previous attempt. Values 
are in seconds ( approx. ).
Default is 600.

smtp_delay
-----------------
This sets a delay for the SMTP client side of JSMail to wait after a
scheduled connection has been established before actually trying to
send mails.
Default is 0

reject_unknown
--------------
This controls what happens when an attempt is made to deliver mail to this
server for a local user that is not recognised. If set to 1, it is rejected.
If set to no, it is delivered to the default user ( usually postmaster ).
Default is yes.

smtp_non-fatal_retry
--------------------
Should there be a non-fatal error code returned by an SMTP server
whilst trying to send a mail, this controls whether JSMail should
try again later or just send the mail to the smarthost for delivery
instead. If yes, it will try again later for up to the number
of days specified by try_send_days.
Default is yes.

etrn_param
----------
When a connection has been made to deliver mail, this entry specifies
the parameter(s) to send with the ETRN command. This command is only
sent when the connection is to the machine specified as the smarthost
and only when this entry has been set.
There is no default setting.

pop3_before_smtp
----------------
If both the SMTP client and POP3 client are enabled, this sets the
timing of them with respect to each other, since some ISPs require
that the POP3 connection is made before the SMTP one as a means
of authentication. 
If this is 0 (default) there is no synchronisation.
If this is 1, the SMTP client waits for the POP3 client to START 
before it sends any waiting mails.
If this is 2, the SMTP client waits for the POP3 client to FINISH
collectiong any mails.
Default is 0.


POP3 settings
=============

pop3_server
-----------
This controls whether or not the pop3 server (listener) is started. 
This is used by clients recieving mail.
Default is yes.

pop3_client 
-----------
This controls whether or not to run the POP3 client and attempt to collect 
mail from another POP3 server.
Default is no.

pop3_accounts
-------------
The file that contains the details of the POP3 account(s) that
mail is to be retrieved from. 
There is no default. See files.txt for the format of this file

pop3_max_in_one_go
------------------
The maximum number of mails to retrieve from the POP3 host in one session. This
can be any number between 1 and 2147483647.
Default is 2147483647.

pop3_defer_larger
-----------------
When retrieving mails from the POP3 server, leave mails larger than this
size to the end. ( ie. get mails smaller than this first ). This can be any
size between 1024 and 2147483647 bytes.
Default is 2147483647.

pop3_wait
----------------
If mail is to be collected from a POP3 server, how often to try.
Default is 600.

pop3_delay
-----------------
This sets a delay for the POP3 client side of JSMail to wait after a
scheduled connection has been established before actually trying to
retrieve mails from the POP3 account(s).
Default is 0

all_pop3_local
--------------
Any mail retrieved from a POP3 server is to be treated as local; the domain
in the mail is ignored.
Default is no.

to_line_priority
----------------
For mail that is retrieved from a POP3 host, this specifies precidence
of the To: header lines in the mail when trying to determine the
destination(s). The higher the number, the higher the precidence.
Default is 2.

check_cc_line
-------------
This setting specifies whether or not to check any Cc: lines for
local destinations. If found, these are added to the list of
destinations for the mail.
Default is no.

received_line_priority
----------------------
For mail that is retrieved from a POP3 host, this specifies precidence
of the Received: header lines in the mail when trying to determine the
destination. The higher the number, the higher the precidence.
Default is 3.

use_first_received_line
------------------------
When using the Received: headers, this specifies whether to use the
latest Received: line with a valid destination or the earl;iest.
Default is yes.

subject_line_priority
----------------------
For mail that is retrieved from a POP3 host, this specifies precidence
of the Subject: header lines in the mail when trying to determine the
destination. The destination is matched using the mappings in the
file specified by 'subject_file'. The higher the number, the higher the precidence.
Default is 1.

user_line_priority
----------------------
For mail that is retrieved from a POP3 host, this specifies precidence
of the user-defined header lines in the mail when trying to determine the
destination. The higher the number, the higher the precidence. See "user_header". 
Default is 4.

user_header
-----------
A user-defined header that can be checked for a destination when retrieving
mail from a POP3 host. This is a regular expression ( see files.txt ) and
should NOT include the ':' that follows the header name.

delete_retrieved
----------------
If no, when mails are retrieved from other POP3 servers, mail so retrieved
is not deleted from the server. 
Default is yes.



Finger settings 
===============

finger_server
-------------
This controls whether or not to start the finger server. ( 1 = start )There is no default.
Default is no.

finger_dir
----------
The directory containing the .fgr files
Defaults to the current directory.



Auto responder settings
=======================

auto_responder
--------------
This controls whether or not to run the auto-responder ( 1 = yes )
Default is no.

auto_wait
----------------
This controls how often to check for mail for the auto-responder user.
The values are approximately in seconds.
Default is 10.

responders
----------
The name of the autoresponder config file
There is no default.

mailsrv
-------
The name of the user that is the auto-responder.
Defaults to 'robot'.



