Main configuration file of bounceHammer
After you have installed bounceHammer into /usr/local/bouncehammer successfully
and have created the database for storing parsed data, Next,
Create a main configuration file of bounceHammer.
Copy the sample file which is installed in the directory /usr/local/bouncehammer/etc and Edit it.
Copy and Edit bouncehammer.cf
The Main configuration file "bouncehammer.cf" is a YAML formatted file.
Note that If there is any syntax error in the configuration file,
bounceHammer will not work properly.
# cd /usr/local/bouncehammer/etc ⏎
# /bin/cp bouncehammer.cf-example bouncehammer.cf ⏎
# vi bouncehammer.cf ⏎
# Edit database configurations
# Database type(Available values are PostgreSQL, MySQL or SQLite)
# If you use SQLite database, please specify a path into the dbname value.
# dbtype: 'SQLite'
# dbname: '/usr/local/bouncehammer/var/db/bouncehammer.db'
dbtype: 'MySQL' <- Database software you selected
dbname: 'bouncehammer' <- Database name you created
# Database name, username and password of the db-user
username: 'bouncehammer' <- Database username you created
password: '794-uguisu-heiankyo' <- Database password you configured
# Database host or IP address, and port number
# Postgresql = 5432, MySQL = 3306 by default. If the dbtype value is
# 'SQLite', the system ignores the 'port' value.
hostname: '127.0.0.1' <- a hostname or an IP address which running DB
port: 3306 <- A port number the database is listening
If you use SQLite as a DB
If you use SQLite as a database, set the full path of the database file
to the value of the key dbname:.
Connect via UNIX Domain Socket
If you connect to the database via UNIX domain socket,
set an empty value to two keys: hostname: and port:,
Or comment-out these keys. When the value of dbtype is SQLite,
the values of two keys: hostname: and port: will be ignored.
Beginning with bounceHammer 2.7.0,
results of execution of some commands and WebUI are sent to syslog.
But by default, bounceHammer does not send message to syslog.
If you want to use bounceHammer with syslog, configure like the following:
# UNIX syslog(3) configuration, Beginning with bounceHammer 2.7.0
# mailboxparser, logger, databasectl, and tablectl use this configuration
# By default, messages will not be sent syslog(3). If you want to
# use syslog(3), set 1 to the value of enabled:.
facility: 'local6' select a proper facility in your environment
To configure the syslog.conf on your system,
Refer sample configuration file in INSTALL-DIRECTORY/etc/syslog.conf-example .
If you use WebUI (browser based control panel), Proceed to
This section describe the fields(keys) and the values of etc/bouncehammer.cf file.
You don't need to change the values in the file except database configuration (previous settings).
bouncehammer.cf is loeded by bounceHammer as a YAML formatted file.
If the file has a syntax error or a invalid value, bounceHammer does not work properly.
bouncehammer.cf/Whole system settings
System name. As of present, it is used to check that the configuration
file has been loaded successfully.
Do not change this value unless you have particular reason.
The version number of the configuration file (Not system version). As of present,
it is used to check that the configuration file has been loaded successfully.
Do not change this value unless you have particular reason.
- Setting name. It is useful for using multiple configuration files.
file: File Configurations
Maximum size of a mailbox file for parsing by
command. The default value is about 128MB.
File name prefix of the file (parsed data) which will be created by
command with the -l, --log option. The default value is hammer.
File name suffix of the file (parsed data) which will be created by
command with the -l, --log option. The default value is tmp.
File name prefix of the file which will be created by
command. The logger command integrate/accumulate files which are created
by mailboxparser command into one log file. The default value is hammer.
File name suffix of the file which will be created by
command. The logger command integrate/accumulate the files which are created
by mailboxparser command into one log file. The default value is log.
directory: Directory Configurations
Directory name which holds the configuration files of bounceHammer.
The default value is INSTALL-DESTINATION/etc .
Directory name which hold a pid file of each command in the bin/ directory.
The default value is INSTALL-DESTINATION/var/pid .
Directory name which bin/logger command save log files.
The default value is INSTALL-DESTINATION/var/log .
Temorary directory name for the commands in bin/ directory.
The default value is /tmp .
As of present, The file downloading feature on WebUI (browser based control panel)
uses this directory. Once downloaded, the archive files are stored this directory
as a cache file until it expires.
The default value is INSTALL-DESTINATION/var/cache .
command save parsed data as a YAML file into this directory.
The default value is INSTALL-DESTINATION/var/spool .
database: Database Configurations
The kind of database software. Three databases: PostgreSQL, MySQL, SQLite
are available as a value.
Database name which is used by bounceHammer.
If you are using SQLite, set the full path to the database file.
Information about how to setup database is available at
Setting Up Database
- Database user name you created
Password of the dbuser (username at above).
If the database require no password, specify an empty string.
The hostname or The IP address of the database.
If you will connect via UNIX domain socket, specify localhost
or an empty string.
The port number of the database to connect. In the case of TCP/IP,
specify the listening port of the database such as 5432 (PostgreSQL),
3306(MySQL). In the case of UNIX Domain Socket,
specify the full path to the socket or an empty string.
environment: Other Environment Settings
Seconds until the command in the bin/ directory timed-out while
reading from STDIN. The default value is 180 seconds.
syslog: UNIX syslog Settings
Use syslog or not. 1 = use syslog, 0 = not use.
syslog facility. Default value is local6.