6 if [ `id -u` = "0" ]; then
7 echo $0: running with id
0, exiting.
11 if ! test -x "$2" ; then
12 echo "\$2 $2: not exeutable"
16 # set up directorytree
17 if ! echo "$1" |
grep -q '^/......' && test -d "$1"; then
18 echo \
$1 needs to be absolute
patch
22 echo ========================================
23 echo running minimal functionality
test for binary
$2 in directory
$1
28 mkdir
-p $top/var
/log
$top/var
/spool
/db
$top/var
/spool
/input
$top/var
/spool
/msglog
$top/run
$top/var
/mail
29 cat <<EOF > $top/exim4.conf
32 log_file_path = $top/var/log/%slog
33 spool_directory = $top/var/spool
34 pid_file_path = $top/run
35 primary_hostname = eximtest.example.com
41 transport = writetofile
46 file = $top/var/mail/\$local_part
52 cat <<EOF > $top/var/mail/compare
53 From from@eximtest.example.com Sat May 07 12:12:12 2012
54 Return-path: <from@eximtest.example.com>
55 Envelope-to: recip@eximtest.example.com
56 Delivery-date: Sat, 07 May 2011 12:12:12 +0000
57 Received: from buildd by eximtest.example.com with local (Exim 4.44)
58 (envelope-from <from@eximtest.example.com>)
60 for recip@eximtest.example.com;Sat, 07 May 2011 12:12:12 +0000
61 From: Testing Exim <from@eximtest.example.com>
62 To: Recipient <recip@eximtest.example.com>
64 Message-Id: <Emsgid@eximtest.example.com>
65 Date: Sat, 07 May 2011 12:12:12 +0000
71 $2 -C "$top/exim4.conf" -bV
72 $2 -C "$top/exim4.conf" -be '${if bool{0}{yes}{no}} X ${if !bool{0}{yes}{no}}'
73 $2 -C "$top/exim4.conf" -bt local
74 printf 'From: Testing Exim <from@eximtest.example.com>\nTo: Recipient <recip@eximtest.example.com>\nSubject: Test Message\n\nno body\n' | \
75 $2 -C "$top/exim4.conf" -odf -oep -oi -t -f from@eximtest.example.com
76 sed -i -e 's/^From \([^ ]*\) .*/From \1 Sat May 07 12:12:12 2012/' \
77 -e 's/^Delivery-date: .*/Delivery-date: Sat, 07 May 2011 12:12:12 +0000/' \
78 -e 's/^Received: from [^ ][^ ]* /Received: from buildd /' \
79 -e '/^Received:/s/(Exim [^)]*/(Exim 4.44/' \
80 -e '/[[:space:]]for /s/;.*/;Sat, 07 May 2011 12:12:12 +0000/' \
81 -e '/[[:space:]]id /s/id .*/id msgid/' \
82 -e 's/^Message-Id: [^@]*/Message-Id: <Emsgid/' \
83 -e 's/^Date: .*/Date: Sat, 07 May 2011 12:12:12 +0000/' \
86 diff -u $top/var
/mail
/recip
$top/var
/mail
/compare