Mercurial > masqmail
view INSTALL @ 211:0f36c0a46f82
replaced hmac_md5.c with an own implementation of RFC 2104
Until now the sample code of the RFC itself was used,
but it lacked a license or copyright notice.
See the comment in hmac_md5.c for details.
author | meillo@marmaro.de |
---|---|
date | Sun, 18 Jul 2010 22:20:36 +0200 (2010-07-18) |
parents | 0241aaccfcdb |
children | cab46cefa4ce |
line wrap: on
line source
Additional information may be available in docs/ or on the website. For installing on GNU/Linux distributions read docs/INSTALL.linux. Installation instructions ------------------------- To compile masqmail you need glib (>= 1.2) (http://www.gtk.org). Your distribution probably provides it. Glib-2.0 works out of the box, for glib-1.2, you need to adjust configure.ac. See the comment in there. You need a user and a group for masqmail to run. If grep '^mail:' /etc/passwd grep '^trusted:' /etc/group shows that the user `mail' and the group `trusted' exist, it's probably best to use these. If they don't exist, create them: groupadd -g 42 trusted useradd -u 23 -g trusted -d /nonexistent -s /bin/false -c "masqmail MTA" mail If you use other names than `mail' and `trusted' use the options described below for configure. The 23 and 42 are just a suggestion, you can use any (not yet used) number you like, but preferably one lower than 100. It does not have to be the same for the user `mail' and the group `trusted'. Compiling is a matter of the usual procedure. In the source directory, after unpacking do: ./configure make make install Additional options for configure -------------------------------- See the output of ./configure -h Here is a selection of the options with additional explanations: --with-user=USER sets the user as which masqmail will run. Default is 'mail'. USER has to exist before you 'make install'. --with-group=GROUP sets the group as which masqmail will run. Default is 'trusted'. GROUP has to exist before you 'make install'. --with-logdir=LOGDIR sets the directory where masqmail stores its log files. It will be created if it does not exist. Default is /var/log/masqmail/. --with-spooldir=SPOOLDIR sets the directory where masqmail stores its spool files. It will be created if it does not exist. Default is /var/spool/masqmail/. --with-confdir=CONFDIR sets the default configuration directory to CONFDIR, in case you prefer another location than /etc/masqmail/. --enable-auth enables ESMTP AUTH support (disabled by default) --enable-ident enables RFC 1413 support. If you have the libident dynamic library installed, this will be linked, otherwise it will be statically linked using the sources included in the package. --disable-resolver disables resolver support. Without the resolver functions, masqmail uses only gethostbyname() to resolve DNS names, and you cannot send mail without a smart host. Not recommended. --with-libcryto instead of using the md5 and hmac functions within the package, link dynamically with libcrypto. This applies only if you have SMTP AUTH enabled. Only makes sense if your resources are limited and you have libcrypto installed. Untested. --disable-debug disables debugging; setting it on the command line or in the configuration has no effect. Strongly discouraged, since you miss valuable information if something goes wrong. Checking the installation ------------------------- Check that 'make install' worked correctly. The following command: ls -ld /usr/local/sbin/masqmail /etc/masqmail /var/log/masqmail/ \ /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/* should give output similar to -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock Important are the set-user-id bit for /usr/local/sbin/masqmail and the permissions of all files. Making masqmail the default --------------------------- `sendmail' is the de-facto standard name of the system's MTA, no matter which MTA actually runs. If you want to make masqmail the system's MTA (i.e. replace sendmail, postfix, etc), make two symbolic links: ln -s /usr/local/sbin/masqmail /usr/lib/sendmail ln -s /usr/local/sbin/masqmail /usr/sbin/sendmail Now every mailer that used to call sendmail will now call masqmail. If you already had an MTA installed and running, you can kill it and start masqmail. Probably with: /etc/init.d/sendmail restart If this doesn't work as expected, you might need to add a special init script for masqmail. Currently none is distributed with masqmail. (Hopefully this will change soon.) Please ask on the mailing list for help. You can also directly start masqmail as daemon with: /usr/local/sbin/masqmail -bd -q30m Basic Configuration ------------------- The only thing you must configure in order to use masqmail is the hostname. It's the name under which masqmail operates. In most cases it is the same as the machine's name, but it can be different. The script `contrib/guess-hostname' tries to print the hostname of your machine. The first output line is probably the best choice. Create a minimal config with: echo "host_name = HOSTNAME" >/etc/masqmail/masqmail.conf (Substitute `HOSTNAME' with the real value, of course.) Such a setup (i.e. the default one) does: - deliver mail locally - accept mail on stdin (plain text) - accept mail on stdin (SMTP) (if started with -bs) - accept mail on the local port 25 (SMTP) (if started with -bd) It does not - transfer mail to other machines - accept mail from outside your machine For more elaborate setups, have a look at docs/*setup and docs/INSTALL*. You can also take the example configuration files in examples/ as basis for your own. Take the man pages masqmail.conf(5) and masqmail.route(5) for reference. All configuration files should go into /etc/masqmail. Written by oku. Improved by meillo.