MOPHERD.CONF(5) File Formats Manual MOPHERD.CONF(5)

NAME

mopherd.confthe mopher daemon configuration file

DESCRIPTION

The mopherd.conf file contains the default configuration used by mopherd(8) and mopherctl(8) to set various parameters for mopher's core functionality and its modules. The list of all rules enforced by mopher can be found in mopherd.acl(5).
Comment lines in mopherd.conf start with the ‘#’ character, empty lines are treated as comments. Configuration directives are key-value pairs and can span multiple lines. Both key and value allow for some structure in that a key may contain indices and a value can be a table containing other (comma-separated) key-value pairs:
key_a		 = "string" 
key_b		 = -1.0 
 
key_c[id_x]	 = 1000 
key_c[id_y]	 = 127.0.0.1 
 
key_d = { 
	key_e	 = "/path/to/file", 
	key_f	 = 200K, 
	key_g	 = 12h, 
	key_h	 = ::1 
}
Each integer may have one of the following optional suffixes:
s[econd]
multiply by 1
m[inute]
multiply by 60
h[our]
multiply by 3600
d[ay]
multiply by 86400
K[ibi]
multiply by 1024
M[ebi]
multiply by 1048576
G[ibi]
multiply by 1073741824

GENERAL CONFIGURATION

The following directives control the general behaviour of mopher (default values are enclosed in parentheses):
acl_log_level (3)
Syslog severity level (0-7) for messages logged by the log keyword in mopherd.acl(5).
acl_path (“/etc/mopher/mopherd.acl”)
Path to mopherd.acl(5).
control_socket (“inet:44554@127.0.0.1”)
Socket used by mopherctl(8) to control a running mopherd(8) instance. Supported socket types are tcp (inet:port@address) and unix domain sockets (unix:/path/to/socket).
control_socket_permissions (0660)
File system permissions of control_socket. Only applies to unix domain sockets.
foreground (0)
Run in foreground, don't detach from the controlling terminal.
greylist_deadline (1d)
Default maximal lifetime of a greylist item. Older items will be removed from the greylist. All greylist rules in mopherd.acl(5) without a deadline parameter will use this value.
greylist_visa (30d)
Default maximal lifetime of a greylist visa item. Older visa items will be removed from the greylist. Greylist items are upgraded to visa items when delay expires or the number of attempts is met. Subsequent successful mail deliveries will renew any existing visa item (i.e. reset its remaining lifetime).
hostname (gethostname(3))
Default hostname used in self-references.
log_level (4)
Syslog severity level (0-7) for messages logged by mopherd(8).
milter_socket (inet:44555@127.0.0.1)
Socket used by MTAs to communicate with a running mopherd(8) instance. Supported socket types are tcp (inet:port@address) and unix domain sockets (unix:/path/to/socket).
milter_socket_permissions (0660)
File system permissions of milter_socket. Only applies to unix domain sockets.
milter_socket_timeout (7210s)
Default timeout for any communication between mopher and MTAs.
module_path (“/usr/lib/mopher”)
Path to loadable mopher modules. mopherd(8) will load all available modules in module_path during startup.
mopherd_user (“mopher”)
User ID of mopherd(8) set during startup. All files and sockets will be created as mopher_user.
mopherd_group (“mopher”)
Group ID of mopherd(8) set during startup. All files and sockets will be created as mopher_group.
tarpit_progress_interval (10s)
Interval between two progress notifications issued during tarpitting. When mopherd(8) is tarpitting a host, it needs to issue periodic notifications to the MTA in order to reset its timeouts.
workdir_path (“/”)
Working directory of mopherd(8) set during startup.

TABLE CONFIGURATION

Mopher keeps its lists and state in generic tables. The following two tables are part of mopher's core functionality:
state
Contains some mopherd(8) state data. Currently, it consists of a strictly increasing integer, incremented by mopherd(8) on each new connection and used as a distinct connection identifier in logs.
greylist
Contains greylist and visa triplets (origin, sender and recipient combinations) and various metadata about them.
Defining a generic table also requires specifying its backend driver. Backend drivers will translate all requests to generic tables into requests as they are understood by that particular backend or library.
The two most common types of backend drivers require one of the following two configuration directives when, for example, configuring the greylist table:
# illustrative raw_db backend, 
# implementing a whole RDBMS 
table[greylist] = { 
	driver		= "raw_db", 
	path		= "/path/to/greylist.db" 
} 
 
# illustrative net_db backend, 
# implementing socket access methods to a RDBMS 
table[greylist] = { 
	driver		= "net_db", 
	host		= 127.0.0.1, 
	database	= "mopher", 
	table		= "greylist", 
	user		= "mopher", 
	pass		= "secret" 
}
Currently available backend drivers are:
memdb (Memory DB)
A simple hash table stored in main memory. Not persistent. If no backend driver was configured for a table, that table will use the memdb driver and therefore lose all its content as soon as mopherd(8) shuts down.
bdb (Berkeley DB)
Embedded database for key/value data. Uses the legacy format/API (1.85) that in most distributions is either part of the standard C library or offered separately by one of the more recent db software-packages.
sakila (MySQL)
SQL database management system.
Note: All backend drivers available in the mopher source distribution are usually compiled as loadable mopher modules.

MODULE CONFIGURATION

Loadable mopher modules may extend mopher in mainly two ways: A Module may provide additional backend drivers for tables or additional symbols and functions that are made available to mopherd(8) during its evaluation of mopherd.acl(5).
The following list only describes configuration directives for modules that require some configuration. See mopherd.acl(5) for additional information on usage and behaviour.

Relay and Penpal Counter

counter counts the amount of successfully delivered messages by an origin (address or domain) or penpal (origin, sender and recipient combination). Both counters are stored in tables and therefore require the selection of a backend driver:
table[counter_relay] = { 
	driver		= "bdb", 
	path		= "/path/to/relay.db" 
} 
 
table[counter_penpal] = { 
	driver		= "bdb", 
	path		= "/path/to/penpal.db" 
}
The following directives control the general behaviour of counter (default values are enclosed in parentheses):
counter_expire_low (7d)
Default maximal lifetime of a counter item with a value less than counter_threshold.
counter_expire_high (60d)
Default maximal lifetime of a counter item with a value greater than counter_threshold.
counter_threshold (3)
See counter_expire_low and counter_expire_high.

DNSBL Resolver

dnsbl maps DNSBL query results to mopherd.acl(5) symbols. Each black- or whitelist needs to be defined through the indexed keyword dnsbl before it can be used in mopherd.acl(5):
dnsbl[list_foo] = blacklist.foo.org 
dnsbl[list_bar] = whitelist.bar.net
where the name of the index is the name of the symbol exported to mopherd.acl(5).

SpamAssassin Resolver

spamd submits messages to SpamAssassin and maps the evaluation results to mopherd.acl(5) symbols.
The following directives control the general behaviour of spamd (default values are enclosed in parentheses):
spamd_socket (“inet:783@127.0.0.1”)
Socket used by mopherd(8) to check incoming messages for their score and matching tests.

IMPLEMENTATION NOTES

Third party distributors of binary packages may split a full mopher build into several complementary packages in order to make some dependencies optional. In such cases, it is possible that some modules are not available on your system even though they are documented here.
October 30, 2014 mopher 0.5.3