Sophie

Sophie

distrib > Mandriva > current > x86_64 > media > contrib-testing > by-pkgid > 6210a0325131e44d167fe301ae4414ca > files > 8

gnarwl-3.6-1mdv2010.2.x86_64.rpm

Prerequisites
-------------

In order to get gnarwl compiled and working, you need the following:

- gcc (v2.95.3)
- libgdbm (v1.8.0)
- openldap2 (v2.0.23)
- MTA (postfix recommended)
- GNU make, groff, gzip
- Linux (v2.4.18)

Of course it may work with a different setup, but this is what gnarwl was
developed/tested with. If you (don't) get it to work on an alternative
platform, please contact me. Feedback is always welcome.


Building and installing GNARWL
------------------------------

Starting with version 3.0, there are two ways of getting gnarwl installed.

* Installing from source *

tar -zxf gnarwl-<version>.tgz
cd gnarwl-<version>.tgz
./configure
make
make install
make perm

This will install the program under /usr/local (NOTE: "make perm" is optional, 
but strongly recommended, as it creates a systemaccount for gnarwl and chowns
the according files).

* Using RPM *

Building RPM packages requires a little more work, but is well worth it. It
starts the same way as installing from source:

tar -zxf gnarwl-<version>.tgz
cd gnarwl-<version>.tgz
./configure
make

This will create the specfile in the data directory, as well as verify, that
your system is able to build gnarwl at all. Now locate your rpm base dir
(usually somewhere under /usr/src), and copy the the specfile to 
$RPMBASE/SPECS and the original gnarwl tarball to $RPMBASE/SOURCES. The
command to build the package is "rpm -ba <specfile>". And the resulting
package may be installed using "rpm -i package.rpm".

* Configuring *

No matter which installation method you choose, you still have to edit the
gnarwl.cfg file afterwards (at least the searchbase must be set) and should
check, that the blacklist is filled proberly (you should put all the
addresses of systemaccoutns herin, as well as any emailaddress, that is
shared by several users).

Configuring LDAP
----------------

To cope with vacations, LDAP requires the respective objectclasses. It is
recommended to install the included ISPEnv.schema file. In case you are
using OpenLDAP version 2, just copy it from the docs directory to wherever
your other *.schema files are located. Add the corresponding "include" 
line to your slapd.conf and restart the LDAP server. In case this is not an
option for you: Gnarwl does not depend on a certain schema, as it doesn't 
use any hardcoded attribute names. You may (ab)use any other schema you like.


Configuring the Mailserver
---------------------------

A complete guide to configuring your mailsystem is beyond the scope of
this document (refer to the manuals of your MTA), so this section will
only describe what has to be done, in order to integrate gnarwl in an
an already working mailsystem. It is assumed, you did not skip the 
"make perm" step, that is, a local account named "gnarwl" does exist.

The basic idea is to get your MTA to pipe a copy of every received mail (well, 
at least those, that could be subject to autoresponding) through to gnarwl.
There are several ways to do this (largely depending on which MTA you 
use):

* Platform independant solution *

Edit your alias/virtual lookup table, so each mailaddress contains a forward
to the local user "gnarwl". The ~gnarwl/.forward file, generated by 
"make install" will then take care of piping the mail through to gnarwl.
Another way is to utilize gnarwl in the same fashion as vacation(1), but
this of course requires homedirectories, and therefore somehow beats the 
whole idea.

* Postfix *

1. Define a new transport:
/etc/postfix/transports
autoreply.domain.com    gnarwl:

2. Create transport.db file and include in postfix config:
/etc/postfix/main.cf
transport_maps= hash:/etc/postfix/transport

3. Add to /etc/postfix/master.cf:
gnarwl    unix  -       n       n       -       -       pipe flags=F 
user=gnarwl argv=/usr/local/bin/gnarwl -s $sender -a $recipient


4. Restart postfix

5. Define an alias for every user, who may use the autoresponder:
user1@domain.com   -> user1@domain.com user1@autoreply.domain.com


* Sendmail *

Sorry, no info available at this time.

* Exim *

Sorry, no info available at this time.

* Qmail *

Sorry, no info available at this time.



Troubleshooting
----------------

Ok, you followed the instructions in this file, but somehow it didn't work
out, right? Ok, first things first, this sections deals with setting gnarwl
up, not with compiling. If the later is your problem and you can't figure it
out (even if you can), you should contact me, so I can fix the source.

Well, there are numerous ways, to goof up, installing gnarwl (even happens
to me, and I worte that stuff ;-) ). First you should su(1) to the user,
gnarwl is supposed to run as (default is usually "gnarwl"). Now check, if
gnarwl would be able to access it's own config and database files. If the
file permissions are set up correctly, set the loglevel to 3 (debug) in
gnarwl.cfg, call gnarwl using the -a and -s commandline switches (use
meaningfull emailaddresses here). Check your maillog for "CRIT" and "WARN"
messages. If none show up, try using ldapsearch, to see if there are actually
entries in your database, that could be used for autoresponding.