# # BDKIM.conf - Config file for BDKIM perl server # Copyright (c) 2011, Casey Connor # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # - Neither the name of Lacinato nor the names of its contributors may be used to # endorse or promote products derived from this software without specific prior # written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Version 1.0 # Casey Connor -- lacinato.com # http://lacinato.com/cm/software/emailrelated/bdkim # ############################################################################################# # You probably want to change, at a minimum, the 'user' and 'group' values. # You probably want to consider changing the 'host', 'port' and 'message_size_limit'. # If you write your own custom client, you need to confirm the value of 'should_clean_lines'. ############################################################################################# # if you change this file while BDKIM is running, you should be able to kill -HUP the # parent process to refresh the BDKIM system (parent id found in BDKIM.pid), but remember # that doing so will kill the child processes while they work, so make sure you have # stopped any dependent client processes first. # become this username and group user bdkim group bdkim # what interface/port to bind to host 127.0.0.1 port 12300 # message_size_limit is the max size of messages handled, in bytes. If you transmit a message # larger than this, BDKIM will abort the sending and give an error. 9 digits max. This can't # currently be disabled (sorry) so don't try setting it to 0. # 999999999 bytes is ~1GB, which would effectively disable size limiting. 20MB, in bytes, is 20971520. message_size_limit 20971520 # timeout for data transmission, in seconds, 6 digits max timeout 30 # if should_clean_lines is set to "1" (or "true") then BDKIM will "chomp" and remove all # line endings (proper or not) and replace them with proper RFC-2822 line endings (\r\n), # which are required for DK/DKIM evaluation. If the data you're sending already has those # line endings, then this should be set to "0" to disable the cleaning and save some CPU. # The Java client included with this distribution does the cleaning already, so this # is set to "0" by default, but if you change the Java client or make your own client, # remember to consider this. Set this to "0" or "1", but don't use "false": that will # count as "1". should_clean_lines 0 # set the logging level here (level 2 basically just logs startup/shutdown events and errors) # 1-4, 3 is verbose, 4 is debug. Even level 4 doesn't log all that much, really. log_level 2 # location of log file and .pid file, can be set to simply "BDKIM.log" to be placed in same # directory that process starts in log_file BDKIM.log pid_file BDKIM.pid # should I daemonize? setsid yes # some config for the Net::Server::Prefork min_servers 1 min_spare_servers 1 max_spare_servers 100 max_servers 200 # time in secs to poll for excess servers check_for_waiting 30 ####################################################################### # What follows is just handy reference for the other config options. # You can skip it unless you need finer control of the server behavior. ####################################################################### # From Net::Server # see http://search.span.org/~rhandom/Net-Server-0.97/lib/Net/Server.pod ######################################################### # # Key Value Default # # conf_file "filename" undef # # log_level 0-4 2 # log_file (filename|Sys::Syslog) undef # # ## syslog parameters # syslog_logsock (native|unix|inet|udp # |tcp|stream|console) unix (on Sys::Syslog < 0.15) # syslog_ident "identity" "net_server" # syslog_logopt (cons|ndelay|nowait|pid) pid # syslog_facility \w+ daemon # # port \d+ 20203 # host "host" "*" # proto (tcp|udp|unix) "tcp" # listen \d+ SOMAXCONN # # reverse_lookups 1 undef # allow /regex/ none # deny /regex/ none # cidr_allow CIDR none # cidr_deny CIDR none # # ## daemonization parameters # pid_file "filename" undef # chroot "directory" undef # user (uid|username) "nobody" # group (gid|group) "nobody" # background 1 undef # setsid 1 undef # # no_close_by_child (1|undef) undef # # ## See Net::Server::Proto::(TCP|UDP|UNIX|etc) # ## for more sample parameters. # ####################################################### # From Net::Server::PreForkSimple ####################################################### # Key Value Default # # max_servers \d+ 50 # max_requests \d+ 1000 # # serialize (flock|semaphore|pipe) undef # # serialize defaults to flock on multi_port or on Solaris # lock_file "filename" POSIX::tmpnam # # check_for_dead \d+ 30 # # max_dequeue \d+ undef # check_for_dequeue \d+ undef ####################################################### # From Net::Server::PreFork ####################################################### # Key Value Default # # min_servers \d+ 5 # min_spare_servers \d+ 2 # max_spare_servers \d+ 10 # max_servers \d+ 50 # max_requests \d+ 1000 # # serialize (flock|semaphore|pipe) undef # # serialize defaults to flock on multi_port or on Solaris # lock_file "filename" POSIX::tmpnam # # check_for_dead \d+ 30 # check_for_waiting \d+ 10 # # max_dequeue \d+ undef # check_for_dequeue \d+ undef # # child_communication 1 undef ####################################################### # From Net::Server::Proto::TCP ####################################################### # None #######################################################