Responder Installation
Prev | Chapter 2. Installing Lire | Next

## Responder Installation

When you want to generate reports for several servers, it is best to install Lire as a responder on one system to which to other systems can send their log files. This section describes how to setup Lire as a responder.

### Requirements

Responder installation has the same requirements as the standalone installation (see the section called “Standalone Installation”).

There is the following additional requirement:

- The `MIME-Tools` perl module (available from any CPAN mirror, http://www.cpan.org/modules/by-module/MIME/.

### Installation

Basic installation procedure is the same as a standalone installation (see the section called “Standalone Installation”). You might want to change the `--with-spooldir` option to configure (the default is ``prefix`/var/spool/lire`:

    $ ./configure [--prefix=path --with-spooldir=path_to_spooldir]

Lire in a responder setup runs the lr_spoold daemon which scans maildirs where requests are delivered. Consequently, to finish the responder installation you have to create a maildir for each service you want to support and setup delivery to those maildirs.

### Note

A maildir is a mailbox format first developed as part of Qmail where messages are stored in a directory hierarchy instead of a single file. You can find more informations about the maildir format at http://www.courier-mta.org/maildirmake.html.

As far as Lire is concerned, a maildir is a subdirectory ``service`/Maildir/new` which contains email messages in separate files.

The ``sysconfdir`/lire/address.cf` contains the name of the maildirs that are to be scanned and the type of log files that the emails should contain.

Refer to your MTA's documentation for notes on how to setup delivery to maildir. We give some notes on how to do this in the following sections.

One can create the maildirs by doing e.g.

    $ cd ~/logreport
    $ mkdir -p var/spool/lire/apachecommon
    $ maildirmake var/spool/lire/apachecommon/Maildir
    $ cd ~/logreport/var/spool/lire
    $ mkdir bind8 postfix qmail sendmail
    $ maildirmake bind8/Maildir
    $ maildirmake postfix/Maildir
    $ maildirmake qmail/Maildir
    $ maildirmake sendmail/Maildir

maildirmake gets distributed with qmail and with the Courier Mail Server http://www.courier-mta.org. If you haven't set up delivery to maildirs yet, doing a

    $ maildirmake foo

is about the same as doing

    $ mkdir foo
    $ mkdir foo/cur foo/new foo/tmp
    $ chmod og-rwx foo foo/*

### Installing Under MTA's using procmail as their MDA

On many systems, procmail is used as the default Mail Delivery Agent. For instance, sendmail very often is configured to use procmail. If your MTA is configured like this, you can use procmail to take care of delivering to the right Maildir. We give some hints on how to get this done.

In Lire's `$HOME/.procmailrc` you can put

              :0:
              * ^To:.*combined-log@
              <LR_SPOOLDIR>/combined/Maildir/new

              :0:
              * ^To:.*sendmail-log@
              <LR_SPOOLDIR>/sendmail/Maildir/new

etc. Make sure to replace `<LR_SPOOLDIR>` by the appopriate path. After that, you'll only have to make sure that the addresses combined-log, sendmail-log, etc. are aliases for the Lire user. You can then run lr_spoold to monitor the spool archives.

### Installing Under Exim

There is more than one way to setup maildir delivery on a system running exim http://www.exim.org/. We show only one.

Be sure to have "maildir_format" enabled in the address_directory: section, e.g.

    address_directory:
      driver = appendfile
      no_from_hack
      prefix = ""
      suffix = ""
      maildir_format

in your exim.conf's transport configuration. Furthermore, have "directory_transport" transport in the userforward driver set to "address_directory", e.g.

    userforward:
      driver = forwardfile
      file_transport = address_file
      pipe_transport = address_pipe
      reply_transport = address_reply
      directory_transport = address_directory
      no_verify
      check_ancestor
      check_local_user
      file = .forward
      modemask = 002
      filter

in your `exim.conf`'s directors configuration. Create a maildir, e.g. `~/.lire/var/spool/combined/`. (See the qmail section for how to do this.) Finally, do e.g.

    $  cat <<EOT > .forward
    > # Exim filter
    > save \$home/.lire/var/spool/combined/
    > EOT

One could create more than one maildir, and configure the useraccount to store email messages for different services in different maildirs. We wont go into this such detail here though.

### Installing Under Postfix

### Installing Under qmail

Suppose your configure-time prefix was $HOME/logreport.

    $ cd ~/logreport/var/spool/lire/postfix
    $ maildirmake Maildir
    $ echo './logreport/var/spool/lire/postfix/Maildir/' > .qmail-postfix

Get mail to postfix@yourhost delivered to hibou-postfix@yourhost, and controlled by `~hibou/.qmail-postfix`:

    $ su
    # cd /var/qmail/control/users
    # vi assign
    =postfix:hibou:1028:1028:/home/hibou:-:postfix:

Get mail to anybody@postfix.yourdomain delivered to the local postfix mailbox:

    # vi virtualdomains
    postfix.yourdomain:postfix

Now send your qmail-send process a SIGHUP.

### Making The Responder Run At Boot

Prev | Up | Next
Anonymized Client Installation | Home | Configuring Lire Using lr_config