# HG changeset patch # User meillo@marmaro.de # Date 1278573634 -7200 # Node ID fc1e5aa286eddcb9867c04f2ef1abfced976dcee # Parent 0025a7677d16f418651162ea1d557d325324f507# Parent 51d8eadf3c79c6c291d1d1eae103fb36faa63ded merge diff -r 0025a7677d16 -r fc1e5aa286ed config.h.in --- a/config.h.in Thu Jul 08 00:53:49 2010 +0200 +++ b/config.h.in Thu Jul 08 09:20:34 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 0025a7677d16 -r fc1e5aa286ed configure --- a/configure Thu Jul 08 00:53:49 2010 +0200 +++ b/configure Thu Jul 08 09:20:34 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 0025a7677d16 -r fc1e5aa286ed configure.ac --- a/configure.ac Thu Jul 08 00:53:49 2010 +0200 +++ b/configure.ac Thu Jul 08 09:20:34 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 0025a7677d16 -r fc1e5aa286ed man/masqmail.conf.5 --- a/man/masqmail.conf.5 Thu Jul 08 00:53:49 2010 +0200 +++ b/man/masqmail.conf.5 Thu Jul 08 09:20:34 2010 +0200 @@ -67,24 +67,28 @@ 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 The directory where local mail is stored, usually \fI/var/spool/mail\fR or \fI/var/mail\fR. \fIfile\fR must be an absolute path. +Default: \fI/var/mail\fR + .TP \fBspool_dir = \fIfile\fR 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 @@ -119,9 +123,11 @@ \fBlocal_hosts = \fIlist\fR A semicolon `;' separated list of hostnames which are considered local. -Normally you set it to "localhost;foo;foo.bar.com" if your host has the +Normally you should set it to "localhost;foo;foo.bar.com" if your host has the fully qualified domain name `foo.bar.com'. +Default: \fIlocalhost\fR + .TP \fBlocal_nets = \fIlist\fR diff -r 0025a7677d16 -r fc1e5aa286ed src/conf.c --- a/src/conf.c Thu Jul 08 00:53:49 2010 +0200 +++ b/src/conf.c Thu Jul 08 09:20:34 2010 +0200 @@ -432,6 +432,10 @@ 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; + conf.local_hosts = parse_list("localhost", FALSE); + conf.mail_dir = "/var/mail"; if ((in = fopen(filename, "r")) == NULL) { fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno));