07) bouncehammer.cf
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 File.
Note that If there is any syntax error in the configuration file,
bounceHammer will not work properly.
# /bin/cp bouncehammer.cf-example bouncehammer.cf ⏎
# vi bouncehammer.cf ⏎
# Edit database configuration database: # 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 you use dbname: 'bouncehammer' <- DB name you created # Database name, username and password of the db-user username: 'bouncehammer' <- DB user name you created password: '794-uguisu-heiankyo' <- Password for the db user # 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' <- Hostname or IP address of the database port: 3306 <- Listening port number of the DB
If you use SQLite as a database
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.
COnfigure syslog
Beginning with Version 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 syslog: # By default, messages will not be sent syslog(3). If you want to # use syslog(3), set 1 to the value of enabled:. enabled: 1 facility: 'local6'
To configure the syslog.conf on your system, please refer sample configuration file in INSTALL-DIRECTORY/etc/syslog.conf-example .
If you use WebUI (browser based control panel), Proceed to webui.cf page.
Keys and Values of bouncehammer.cf
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/Whole system settings
- system
- 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.
- version
- 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.
- name
- Setting name. It is useful for using multiple configuration files
file: File Configurations
- maxsize
- Maximum size of a mailbox file for parsing by bin/mailboxparser command. The default value is about 128MB.
- templog
-
- prefix
- File name prefix of the file (parsed data) which will be created by bin/mailboxparser command with the -l,--log option. The default value is hammer.
- suffix
- File name suffix of the file (parsed data) which will be created by bin/mailboxparser command with the -l,--log option. The default value is tmp.
- storage
-
- prefix
- File name prefix of the file which will be created by bin/logger command. The logger command integrate/accumulate files which are created by mailboxparser command into one log file. The default value is hammer.
- suffix
- File name suffix of the file which will be created by bin/logger command. The logger command integrate/accumulate the files which are created by mailboxparser command into one log file. The default value is hammer.
directory: Directory Configurations
- conf
- Directory name which holds the configuration files of bounceHammer. The default value is INSTALL-DESTINATION/etc .
- pid
- Directory name which hold a pid file of each command in the bin/ directory. The default value is INSTALL-DESTINATION/var/pid .
- log
- Directory name which bin/logger command save log files. The default value is INSTALL-DESTINATION/var/log .
- tmp
- Temorary directory name for the commands in bin/ directory. The default value is /tmp .
- cache
- 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 .
- spool
- bin/mailboxparser command save parsed data as a YAML file into this directory. The default value is INSTALL-DESTINATION/var/spool .
database: Database Configurations
- dbtype
- The kind of database software. Three databases: PostgreSQL, MySQL, SQLite are available as a value.
- dbname
- 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 page.
- username
- Database user name.
- password
- Password of the dbuser (username at above). If the database require no password, specify an empty string.
- hostname
- The hostname or The IP address of the database. If you will connect via UNIX domain socket, specify localhost or an empty string.
- port
- 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
- timeout
- Seconds until the command in the bin/ directory timed-out while reading from STDIN. The default value is 180 seconds.
syslog: UNIX syslog Settings
- enabled
- Use syslog or not. 1 = use syslog, 0 = not use.
- facility
- syslog facility. Default value is local6.
No TrackBacks
TrackBack URL: http://bouncehammer.jp/cgi-bin/mt/mt-tb.cgi/119

Leave a comment