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.
Responder installation has the same requirements as the standalone installation (see the section called “Standalone Installation”).
You will also need the following additional requirement:
Mpack. This is used to decode MIME attachments. You can download Mpack from ftp://ftp.andrew.cmu.edu/pub/mpack/.
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.
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 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/Maildirmaildirmake 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 foois about the same as doing
$ mkdir foo $ mkdir foo/cur foo/new foo/tmp $ chmod og-rwx foo foo/*
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: , e.g.
address_directory: driver = appendfile no_from_hack prefix = "" suffix = "" maildir_formatin 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 filterin your exim.conf's directors configuration. Create a maildir, e.g. ~/.lire/var/spool/combined/. (See the qmail section for how to do this.) At last, do e.g.
$ cat <<EOT > .forward > # Exim filter > save \$home/.lire/var/spool/combined/ > EOTOne could create more maildirs, and configure the useraccount to store mails for different services in different maildirs. We wont go into this much detail here though.
Suppose your configure-time prefix was $HOME/logreport.
$ cd ~/logreport/var/spool/lire/postfix $ maildirmake Maildir $ echo './logreport/var/spool/lire/postfix/Maildir/' > .qmail-postfixGet 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:postfixNow sent your qmail-send process a SIGHUP.