#################################################################
# milter-USERFLUX CONFIG FILE
#################################################################

# If you do/don't want to see debugging messages printed to stdout,
#   then set this appropriately.
$verbose = 0;

# Black/White listing config file
$config_bw_file = "/etc/mail/userflux_bw.conf";

# Set the output file
$outfile="/var/log/userflux.out";    # Outfile path (NEED RESTART)
$log=1;      # Output goes to logfile, no to stdout (NEED RESTART)
$synclog=1;  # Non-buffered output (NEED RESTART, can overwrite, only for testing)
$logmail=1;  # Output mail trace date+ip+from+to+action
$syslog=1;   # Use syslog LOCAL3

# Set this if you want milter add a informative header
$addheader=1;

# Set this to indicate the milter "name" that this milter will be 
#   identified by.  This must match the first parameter from the 
#   INPUT_MAIL_FILTER definition in the sendmail.mc configuration.
$milter_filter_name = 'UserFlux';

# This parameter determines how the milter interfaces with the libmilter
#   API.  Normally, if using a milter on the same machine that is running
#   sendmail, it will be something like 'local:/var/run/userflux.sock', 
#   but if you want to run the milter on a different machine than is running 
#   sendmail, you will need to specify how to connect to that copy of 
#   sendmail by setting this to indicate the machine and port that the 
#   remote sendmail is listening for connections on with something 
#   similar to 'inet:2526@sendmail.server.org'.
# This parameter must match the S= option in the INPUT_MAIL_FILTER
#   definition in the sendmail.mc file.
# $milter_socket_connection = 'local:/var/run/userflux.sock';
$milter_socket_connection = 'inet:808010@nnn.nnn.nnn.nnn';

# Where the pid file should be stored for userflux
$userflux_pid_file = '/var/run/userflux.pid';

# Set this to something nonzero to limit the number of children that the 
#   milter will spawn.  Since children are never recycled (there seems 
#   to be a problem doing that with Sendmail::Milter), threads,
#   once created, will exist until the milter is shutdown.  Each thread
#   also consumes a database connection, so limiting db connections and
#   memory footprint are both good reasons to set this.
# If your mail server handles a large amount of mail, you may need to 
#   increase this limit to avoid blocking, but the default limit is
#   already pretty high, and should be sufficient for all but very 
#   large sites.
# Setting to zero makes the number of threads unlimited.
$maximum_milter_threads = 100;


# If you have very large amounts of traffic and want to reduce the number of 
#   queries the db has to handle (and don't need these features), then these
#   wildcard checks can be disabled.  Just set them to 0 if so.
# If both are enabled, relay_ip is considered to take precedence, and is 
#   checked first.  A match there will ignore the rcpt checks.
$check_wildcard_relay_ip = 1;
$check_wildcard_rcpt_to = 1;
$check_wildcard_rcpt_from = 1;


# The more important setting: how many messages/day will be allowed
# for checked users?
$max_menssages_per_day=500;

# AND, list of "From" DOMAINS you want to check. If empty, ALL
@list_of_domains_to_check=("mydomain.mydomain","other.mydomain.mydomain");

# Interval between DB dumps
$dump_interval=15*60;   # 15 min (in seconds)

# File path for DB dumps
$dump_file="/var/spam/userflux/userflux_DB.txt";  

# Each how may dumps we expire records, cleaning the table?
$dumps_for_cleaning=2;


#############################################################
# End of options for use in external config file
#############################################################


