Mercurial > masqmail-0.2
changeset 46:3cb6f383f07e
fixed tests/local.sh
commented unnecessary lines in config only out (should be polished)
{log,mail,spool}_dir require absolute paths
author | meillo@marmaro.de |
---|---|
date | Wed, 19 May 2010 13:33:05 +0200 |
parents | f0334dc87e1d |
children | 315b74beec1a |
files | src/masqmail.c tests/Makefile tests/conf.templ |
diffstat | 3 files changed, 18 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/masqmail.c Mon May 17 13:16:07 2010 +0200 +++ b/src/masqmail.c Wed May 19 13:33:05 2010 +0200 @@ -629,6 +629,13 @@ if (debug_level >= 0) /* if >= 0, it was given by argument */ conf.debug_level = debug_level; + /* It appears that changing to / ensures that we are never in + a directory which we cannot access. This situation could be + possible after changing identity. + Maybe we should only change to / if we not run as user, to + allow relative paths for log files in test setups for + instance. + */ chdir("/"); if (!conf.run_as_user) {
--- a/tests/Makefile Mon May 17 13:16:07 2010 +0200 +++ b/tests/Makefile Wed May 19 13:33:05 2010 +0200 @@ -2,10 +2,11 @@ # heavily based on Makefile.am written by oliver kurth all: test.conf local.sh smtpout.sh - + mkdir -p ./input ./lock test.conf: conf.templ - sed s/SMTP_HOST/`hostname`/ conf.templ > test.conf + # fails if the current path contains `^'. + sed "s/SMTP_HOST/`hostname`/; s^PWD^`pwd`^" conf.templ > test.conf local.sh: test.templ sed s/RECV_HOST/localhost/ test.templ > local.sh @@ -17,3 +18,4 @@ clean: rm -f test.conf local.sh smtpout.sh + rm -rf ./input ./lock
--- a/tests/conf.templ Mon May 17 13:16:07 2010 +0200 +++ b/tests/conf.templ Wed May 19 13:33:05 2010 +0200 @@ -26,7 +26,7 @@ do_queue = false # The name with which MasqMail identifies itself to others: -host_name="blue.patchwork.net" +host_name="SMTP_HOST" # Hosts considered local: #local_hosts="localhost;blue.patchwork.net;blue" @@ -42,25 +42,25 @@ # send messages to this port: # probably this will also be configurable on host basis -remote_port=25 +#remote_port=25 # where MasqMail stores its spool files and other stuff: #spool_dir="/var/spool/masqmail" -spool_dir="." +spool_dir="PWD" # where local mail will be written to: #mail_dir="/var/spool/mail" -mail_dir="." +mail_dir="PWD" # use syslogd for logs? use_syslog=false # directory for log files if not using syslogd: #log_dir="/var/masqmail" -log_dir="." +log_dir="PWD" # special routes: -connect_route.GWDG = "src/gwdg.route" -connect_route.Argon = "src/argon.route" +#connect_route.GWDG = "src/gwdg.route" +#connect_route.Argon = "src/argon.route"