masqmail
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 diff
1.1 --- a/src/masqmail.c Mon May 17 13:16:07 2010 +0200 1.2 +++ b/src/masqmail.c Wed May 19 13:33:05 2010 +0200 1.3 @@ -629,6 +629,13 @@ 1.4 if (debug_level >= 0) /* if >= 0, it was given by argument */ 1.5 conf.debug_level = debug_level; 1.6 1.7 + /* It appears that changing to / ensures that we are never in 1.8 + a directory which we cannot access. This situation could be 1.9 + possible after changing identity. 1.10 + Maybe we should only change to / if we not run as user, to 1.11 + allow relative paths for log files in test setups for 1.12 + instance. 1.13 + */ 1.14 chdir("/"); 1.15 1.16 if (!conf.run_as_user) {
2.1 --- a/tests/Makefile Mon May 17 13:16:07 2010 +0200 2.2 +++ b/tests/Makefile Wed May 19 13:33:05 2010 +0200 2.3 @@ -2,10 +2,11 @@ 2.4 # heavily based on Makefile.am written by oliver kurth 2.5 2.6 all: test.conf local.sh smtpout.sh 2.7 - 2.8 + mkdir -p ./input ./lock 2.9 2.10 test.conf: conf.templ 2.11 - sed s/SMTP_HOST/`hostname`/ conf.templ > test.conf 2.12 + # fails if the current path contains `^'. 2.13 + sed "s/SMTP_HOST/`hostname`/; s^PWD^`pwd`^" conf.templ > test.conf 2.14 2.15 local.sh: test.templ 2.16 sed s/RECV_HOST/localhost/ test.templ > local.sh 2.17 @@ -17,3 +18,4 @@ 2.18 2.19 clean: 2.20 rm -f test.conf local.sh smtpout.sh 2.21 + rm -rf ./input ./lock
3.1 --- a/tests/conf.templ Mon May 17 13:16:07 2010 +0200 3.2 +++ b/tests/conf.templ Wed May 19 13:33:05 2010 +0200 3.3 @@ -26,7 +26,7 @@ 3.4 do_queue = false 3.5 3.6 # The name with which MasqMail identifies itself to others: 3.7 -host_name="blue.patchwork.net" 3.8 +host_name="SMTP_HOST" 3.9 3.10 # Hosts considered local: 3.11 #local_hosts="localhost;blue.patchwork.net;blue" 3.12 @@ -42,25 +42,25 @@ 3.13 3.14 # send messages to this port: 3.15 # probably this will also be configurable on host basis 3.16 -remote_port=25 3.17 +#remote_port=25 3.18 3.19 # where MasqMail stores its spool files and other stuff: 3.20 #spool_dir="/var/spool/masqmail" 3.21 -spool_dir="." 3.22 +spool_dir="PWD" 3.23 3.24 # where local mail will be written to: 3.25 #mail_dir="/var/spool/mail" 3.26 -mail_dir="." 3.27 +mail_dir="PWD" 3.28 3.29 # use syslogd for logs? 3.30 use_syslog=false 3.31 3.32 # directory for log files if not using syslogd: 3.33 #log_dir="/var/masqmail" 3.34 -log_dir="." 3.35 +log_dir="PWD" 3.36 3.37 # special routes: 3.38 3.39 -connect_route.GWDG = "src/gwdg.route" 3.40 -connect_route.Argon = "src/argon.route" 3.41 +#connect_route.GWDG = "src/gwdg.route" 3.42 +#connect_route.Argon = "src/argon.route" 3.43