masqmail
changeset 151:e20fe8c9936a
default values for logdir and spooldir
we also have defines for LOG_DIR and SPOOL_DIR now
author | meillo@marmaro.de |
---|---|
date | Wed, 07 Jul 2010 10:32:00 +0200 |
parents | 4aa6b6e18a13 |
children | dfb6143e7832 |
files | config.h.in configure configure.ac man/masqmail.conf.5 src/conf.c |
diffstat | 5 files changed, 26 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/config.h.in Tue Jul 06 20:16:33 2010 +0200 1.2 +++ b/config.h.in Wed Jul 07 10:32:00 2010 +0200 1.3 @@ -131,6 +131,9 @@ 1.4 /* Define to 1 if you have the `vprintf' function. */ 1.5 #undef HAVE_VPRINTF 1.6 1.7 +/* The log directory */ 1.8 +#undef LOG_DIR 1.9 + 1.10 /* Name of package */ 1.11 #undef PACKAGE 1.12 1.13 @@ -158,6 +161,9 @@ 1.14 /* The sbin directory */ 1.15 #undef SBINDIR 1.16 1.17 +/* The spool directory */ 1.18 +#undef SPOOL_DIR 1.19 + 1.20 /* Define to 1 if you have the ANSI C header files. */ 1.21 #undef STDC_HEADERS 1.22
2.1 --- a/configure Tue Jul 06 20:16:33 2010 +0200 2.2 +++ b/configure Wed Jul 07 10:32:00 2010 +0200 2.3 @@ -1365,7 +1365,7 @@ 2.4 --with-glib-static=path link glib statically (path mandatory!) 2.5 --with-libcrypto use libcrypto 2.6 --with-liblockfile use liblock (for Debian) 2.7 - --with-logdir=DIR set log directory /var/masqmail 2.8 + --with-logdir=DIR set log directory /var/log/masqmail 2.9 --with-spooldir=DIR set spool directory /var/spool/masqmail 2.10 --with-confdir directory for configuration /etc/masqmail 2.11 2.12 @@ -5440,6 +5440,11 @@ 2.13 fi 2.14 2.15 2.16 +cat >>confdefs.h <<_ACEOF 2.17 +#define LOG_DIR "${with_logdir}" 2.18 +_ACEOF 2.19 + 2.20 + 2.21 2.22 2.23 # Check whether --with-spooldir was given. 2.24 @@ -5451,6 +5456,11 @@ 2.25 fi 2.26 2.27 2.28 +cat >>confdefs.h <<_ACEOF 2.29 +#define SPOOL_DIR "${with_spooldir}" 2.30 +_ACEOF 2.31 + 2.32 + 2.33 2.34 2.35 # Check whether --with-confdir was given.
3.1 --- a/configure.ac Tue Jul 06 20:16:33 2010 +0200 3.2 +++ b/configure.ac Wed Jul 07 10:32:00 2010 +0200 3.3 @@ -247,10 +247,11 @@ 3.4 3.5 dnl log and spool directories 3.6 AC_ARG_WITH(logdir, 3.7 - [ --with-logdir=DIR set log directory [/var/masqmail]], 3.8 + [ --with-logdir=DIR set log directory [/var/log/masqmail]], 3.9 , 3.10 with_logdir='/var/log/masqmail/' 3.11 ) 3.12 +AC_DEFINE_UNQUOTED(LOG_DIR, "${with_logdir}", [The log directory]) 3.13 AC_SUBST(with_logdir) 3.14 3.15 AC_ARG_WITH(spooldir, 3.16 @@ -258,6 +259,7 @@ 3.17 , 3.18 with_spooldir='/var/spool/masqmail/' 3.19 ) 3.20 +AC_DEFINE_UNQUOTED(SPOOL_DIR, "${with_spooldir}", [The spool directory]) 3.21 AC_SUBST(with_spooldir) 3.22 3.23 dnl configuration file
4.1 --- a/man/masqmail.conf.5 Tue Jul 06 20:16:33 2010 +0200 4.2 +++ b/man/masqmail.conf.5 Wed Jul 07 10:32:00 2010 +0200 4.3 @@ -67,9 +67,10 @@ 4.4 4.5 The directory where log are stored, if syslog is not used. 4.6 Debug files are stored in this directory anyways. 4.7 -\fI/var/log/masqmail\fR is a common value. 4.8 \fIfile\fR must be an absolute path. 4.9 4.10 +Default: \fI/var/log/masqmail\fR 4.11 + 4.12 .TP 4.13 \fBmail_dir = \fIfile\fR 4.14 4.15 @@ -82,9 +83,10 @@ 4.16 The directory where masqmail stores its spool files (and later also other stuff). 4.17 It must have a subdirectory \fIinput\fR. 4.18 Masqmail needs read and write permissions for this directory. 4.19 -I suggest to use \fI/var/spool/masqmail\fR. 4.20 \fIfile\fR must be an absolute path. 4.21 4.22 +Default: \fI/var/spool/masqmail\fR 4.23 + 4.24 .TP 4.25 \fBlock_dir = \fIfile\fR 4.26
5.1 --- a/src/conf.c Tue Jul 06 20:16:33 2010 +0200 5.2 +++ b/src/conf.c Wed Jul 07 10:32:00 2010 +0200 5.3 @@ -432,6 +432,8 @@ 5.4 conf.alias_local_cmp = strcmp; 5.5 conf.max_defer_time = 86400 * 4; /* 4 days */ 5.6 conf.max_msg_size = 0; /* no limit on msg size */ 5.7 + conf.spool_dir = SPOOL_DIR; 5.8 + conf.log_dir = LOG_DIR; 5.9 5.10 if ((in = fopen(filename, "r")) == NULL) { 5.11 fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno));