changeset 154:fc1e5aa286ed

merge
author meillo@marmaro.de
date Thu, 08 Jul 2010 09:20:34 +0200 (2010-07-08)
parents 0025a7677d16 (current diff) 51d8eadf3c79 (diff)
children b5ab9cb2f18a
files
diffstat 5 files changed, 33 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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
 
--- 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.
--- 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
--- 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
 
--- 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));