"Fossies" - the Fresh Open Source Software Archive

Member "hermes-1.9/docs/installing-hermes.txt" (29 Jun 2014, 5190 Bytes) of package /linux/privat/hermes-1.9.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 Installing hermes
    2 
    3 NOTE: this file has been generated from the source file
    4 http://www.hermes-project.com/pages/installing-hermes
    5 
    6 To install and configure a fully working hermes, you have to follow these
    7 steps:
    8 
    9 * Install_hermes
   10 * Configure_hermes
   11 * Change_your_current_SMTP_server_to_another_port
   12 
   13 
   14 Install hermes
   15 =================
   16 
   17 If you are going to install from source, you first need to have sqlite3
   18 installed with it's corresponding development package (usually sqlite3-devel or
   19 sqlite3-dev). If you want to install hermes with SSL support, you also need
   20 openssl with it's development headers (usually openssl-devel or openssl-dev).
   21 
   22 - From source
   23 
   24 If you have downloaded a .tar.gz or .tar.bz2 file, the procedure is as follows:
   25 
   26   # tar xvfj hermes-1.0.tar.bz2 # extract file
   27   # cd hermes-1.0 # change to the directory
   28   # ./configure # execute configure
   29   # make # compile
   30   # make install # install
   31 
   32 - From a source RPM
   33 
   34 If you have downloaded a source rpm (.src.rpm) you have to compile it before
   35 installing. To do so, you need the rpmbuild program.
   36 
   37   # rpmbuild --rebuild hermes-1.0.src.rpm
   38 
   39 After compiling, you should have a binary rpm on /usr/src/rpm/RPMS/i386 (or /
   40 usr/src/redhat/RPMS/i386, depending on your distribution). With this file,
   41 proceed to install the rpm.
   42 
   43 - From a binary RPM
   44 
   45 If you have downloaded a binary rpm (.rpm), installing should be pretty
   46 straightforward:
   47 
   48   # rpm -ihv hermes-1.0.rpm
   49 
   50 Configure hermes
   51 ===================
   52 
   53 This document will show you how to configure hermes in the most common way, but
   54 if you want to read the full help for the hermes options, go to the full
   55 reference_of_hermes_options.
   56 
   57 - Config file
   58 
   59 The first thing you need is a configuration file. There should be an example
   60 file on /usr/local/share/doc/hermes or /usr/share/doc/hermes called
   61 hermesrc.example. Copy this file to /etc/hermes/ (create the directory first if
   62 needed)
   63 
   64   # mkdir /etc/hermes
   65   # cp /usr/share/doc/hermes/hermesrc.example /etc/hermes/hermesrc
   66 
   67 Then edit the file, and let's start changing it:
   68 
   69   # vi /etc/hermes/hermesrc
   70 
   71 - Editing the config
   72 
   73 In this section we will be creating a new file from scratch with only the
   74 minimum required to get hermes working.
   75 First, let's specify the user and group to drop privileges to:
   76 
   77   user = nobody
   78   group = nobody
   79 
   80 Now let's configure where the greylisting database is saved (defaults to /var/
   81 hermes/greylisting.db).
   82 
   83   database_file = /var/hermes/greylisting.db
   84 
   85 The only thing left is to specify the host and port with our real SMTP server:
   86 
   87   server_host = localhost
   88   server_port = 2525
   89 
   90 After that, save the file and quit, and make sure that the database_file
   91 directory exists and that it is owned by the user and group we specified
   92 earlier
   93 
   94   # mkdir /var/hermes
   95   # chown nobody:nobody /var/hermes
   96 
   97 If you have compiled hermes with SSL support, you have to configure the
   98 certificate file and the private key
   99 
  100   private_key_file = /etc/hermes/hermes.key
  101   certificate_file = /etc/hermes/hermes.cert
  102 
  103 Now we have to generate the key file and the certificate. To do this we will
  104 use the openssl tool "openssl"
  105 
  106   # openssl genrsa 1024 > /etc/hermes/hermes.key
  107   Generating RSA private key, 1024 bit long modulus
  108   ...................................................++++++
  109   .......++++++
  110   e is 65537 (0x10001)
  111   # openssl req -new -x509 -nodes -sha1 -days 365 -key /etc/hermes/hermes.key > /etc/hermes/hermes.cert
  112   (at this point, openssl will ask lots of questions about your contact
  113   information, organization, and the like. Once it's over, the certificate will
  114   be generated)
  115 
  116 Our resulting file looks like this:
  117 
  118   user = nobody
  119   group = nobody
  120   database_file = /var/hermes/greylisting.db
  121   server_host = localhost
  122   server_port = 2525
  123   private_key_file = /etc/hermes/hermes.key
  124   certificate_file = /etc/hermes/hermes.cert
  125 
  126 Change your server's port
  127 ============================
  128 
  129 Changing the port of your SMTP server is a very different proccess depending on
  130 your SMTP software, although they basically involve editing a file to change
  131 the port number from 25 (default) to another port number. This document will
  132 show you how to change the port number from 25 to 2525, which is hermes'
  133 default. If your server's software is not listed here, try to search for
  134 "<software-name> change default port" (i.e. "sendmail change default port") in
  135 your favourite search engine.
  136 
  137 - Sendmail
  138 
  139 To change sendmail port, edit your sendmail.mc file (usually on /etc/mail) and
  140 edit the line that says:
  141 
  142   DAEMON_OPTIONS(`Port=smtp, Name=MTA')
  143 
  144 and change the Port from smtp to 2525
  145 
  146   DAEMON_OPTIONS(`Port=2525, Name=MTA')
  147 
  148 After that type make to rebuild sendmail.cf
  149 
  150   # make
  151 
  152 And restart sendmail.
  153 Of course, you can always edit the sendmail.cf directly, but if you know how/
  154 what to change, then you don't need this help.
  155 
  156 - Postfix
  157 
  158 If you are using postfix, edit /etc/postfix/master.cf and change the line that
  159 reads
  160 
  161   smtp inet n - n - - smtpd
  162 
  163 to read
  164 
  165   2525 inet n - n - - smtpd
  166 
  167 After that, restart postfix.
  168 
  169 - Qmail
  170 
  171 The easiest way to configure qmail's listening port is to edit /etc/services
  172 and change the line that says
  173 
  174   smtp 25/tcp mail
  175 
  176 to
  177 
  178   smtp 2525/tcp mail
  179 
  180 and restart qmail.