# HG changeset patch # User meillo@marmaro.de # Date 1278491520 -7200 # Node ID e20fe8c9936a1e19b4470d0d14ada2706017f485 # Parent 4aa6b6e18a13c53424529b8dfd8ddf3d378b69fb default values for logdir and spooldir we also have defines for LOG_DIR and SPOOL_DIR now diff -r 4aa6b6e18a13 -r e20fe8c9936a config.h.in --- a/config.h.in Tue Jul 06 20:16:33 2010 +0200 +++ b/config.h.in Wed Jul 07 10:32:00 2010 +0200 @@ -131,6 +131,9 @@ /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF +/* The log directory */ +#undef LOG_DIR + /* Name of package */ #undef PACKAGE @@ -158,6 +161,9 @@ /* The sbin directory */ #undef SBINDIR +/* The spool directory */ +#undef SPOOL_DIR + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff -r 4aa6b6e18a13 -r e20fe8c9936a configure --- a/configure Tue Jul 06 20:16:33 2010 +0200 +++ b/configure Wed Jul 07 10:32:00 2010 +0200 @@ -1365,7 +1365,7 @@ --with-glib-static=path link glib statically (path mandatory!) --with-libcrypto use libcrypto --with-liblockfile use liblock (for Debian) - --with-logdir=DIR set log directory /var/masqmail + --with-logdir=DIR set log directory /var/log/masqmail --with-spooldir=DIR set spool directory /var/spool/masqmail --with-confdir directory for configuration /etc/masqmail @@ -5440,6 +5440,11 @@ fi +cat >>confdefs.h <<_ACEOF +#define LOG_DIR "${with_logdir}" +_ACEOF + + # Check whether --with-spooldir was given. @@ -5451,6 +5456,11 @@ fi +cat >>confdefs.h <<_ACEOF +#define SPOOL_DIR "${with_spooldir}" +_ACEOF + + # Check whether --with-confdir was given. diff -r 4aa6b6e18a13 -r e20fe8c9936a configure.ac --- a/configure.ac Tue Jul 06 20:16:33 2010 +0200 +++ b/configure.ac Wed Jul 07 10:32:00 2010 +0200 @@ -247,10 +247,11 @@ dnl log and spool directories AC_ARG_WITH(logdir, - [ --with-logdir=DIR set log directory [/var/masqmail]], + [ --with-logdir=DIR set log directory [/var/log/masqmail]], , with_logdir='/var/log/masqmail/' ) +AC_DEFINE_UNQUOTED(LOG_DIR, "${with_logdir}", [The log directory]) AC_SUBST(with_logdir) AC_ARG_WITH(spooldir, @@ -258,6 +259,7 @@ , with_spooldir='/var/spool/masqmail/' ) +AC_DEFINE_UNQUOTED(SPOOL_DIR, "${with_spooldir}", [The spool directory]) AC_SUBST(with_spooldir) dnl configuration file diff -r 4aa6b6e18a13 -r e20fe8c9936a man/masqmail.conf.5 --- a/man/masqmail.conf.5 Tue Jul 06 20:16:33 2010 +0200 +++ b/man/masqmail.conf.5 Wed Jul 07 10:32:00 2010 +0200 @@ -67,9 +67,10 @@ The directory where log are stored, if syslog is not used. Debug files are stored in this directory anyways. -\fI/var/log/masqmail\fR is a common value. \fIfile\fR must be an absolute path. +Default: \fI/var/log/masqmail\fR + .TP \fBmail_dir = \fIfile\fR @@ -82,9 +83,10 @@ The directory where masqmail stores its spool files (and later also other stuff). It must have a subdirectory \fIinput\fR. Masqmail needs read and write permissions for this directory. -I suggest to use \fI/var/spool/masqmail\fR. \fIfile\fR must be an absolute path. +Default: \fI/var/spool/masqmail\fR + .TP \fBlock_dir = \fIfile\fR diff -r 4aa6b6e18a13 -r e20fe8c9936a src/conf.c --- a/src/conf.c Tue Jul 06 20:16:33 2010 +0200 +++ b/src/conf.c Wed Jul 07 10:32:00 2010 +0200 @@ -432,6 +432,8 @@ conf.alias_local_cmp = strcmp; conf.max_defer_time = 86400 * 4; /* 4 days */ conf.max_msg_size = 0; /* no limit on msg size */ + conf.spool_dir = SPOOL_DIR; + conf.log_dir = LOG_DIR; if ((in = fopen(filename, "r")) == NULL) { fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno));