Installing hermes
To install and configure a fully working hermes, you have to follow these steps:
After that, please proceed to configuring hermes for statsInstall hermes
From source
If you have downloaded a .tar.gz or .tar.bz2 file, the procedure is as follows:
# cd hermes-1.0 # change to the directory
# ./configure # execute configure
# make # compile
# make install # install
From a source RPM
If you have downloaded a source rpm (.src.rpm) you have to compile it before installing. To do so, you need the rpmbuild program.
From a binary RPM
If you have downloaded a binary rpm (.rpm), installing should be pretty straightforward:
Configure hermes
This document will show you how to configure hermes in the most common way, but if you want to read the full help for the hermes options, go to the full reference of hermes options.
Config file
The first thing you need is a configuration file. There should be an example file on /usr/local/share/doc/hermes or /usr/share/doc/hermes called hermesrc.example. Copy this file to /etc/hermes/ (create the directory first if needed)
# cp /usr/share/doc/hermes/hermesrc.example /etc/hermes/hermesrc
Editing the config
In this section we will be creating a new file from scratch with only the minimum required to get hermes working.
First, let's specify the user and group to drop privileges to:
group = nobody
server_port = 2525
# chown nobody:nobody /var/hermes
certificate_file = /etc/hermes/hermes.cert
Generating RSA private key, 1024 bit long modulus
...................................................++++++
.......++++++
e is 65537 (0x10001)
# openssl req -new -x509 -nodes -sha1 -days 365 -key /etc/hermes/hermes.key > /etc/hermes/hermes.cert
(at this point, openssl will ask lots of questions about your contact information, organization, and the like. Once it's over, the certificate will be generated)
group = nobody
database_file = /var/hermes/greylisting.db
server_host = localhost
server_port = 2525
rbl_domain = zen.spamhaus.org
private_key_file = /etc/hermes/hermes.key
certificate_file = /etc/hermes/hermes.cert
Change your server's port
Changing the port of your SMTP server is a very different proccess depending on your SMTP software, although they basically involve editing a file to change the port number from 25 (default) to another port number. This document will show you how to change the port number from 25 to 2525, which is hermes' default. If your server's software is not listed here, try to search for "<software-name> change default port" (i.e. "sendmail change default port") in your favourite search engine.
Sendmail
To change sendmail port, edit your sendmail.mc file (usually on /etc/mail) and edit the line that says:
Of course, you can always edit the sendmail.cf directly, but if you know how/what to change, then you don't need this help.
Postfix
If you are using postfix, edit /etc/postfix/master.cf and change the line that reads
Qmail
The easiest way to configure qmail's listening port is to edit /etc/services and change the line that says