diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:44:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:44:08 +0000 |
commit | 933bbaf3ed7bd659a5c044745aea763815928598 (patch) | |
tree | 6fe3906ff9f7121999800da3683c206d128b7d39 /debian/tests | |
parent | Adding upstream version 4.94.2. (diff) | |
download | exim4-933bbaf3ed7bd659a5c044745aea763815928598.tar.xz exim4-933bbaf3ed7bd659a5c044745aea763815928598.zip |
Adding debian version 4.94.2-7+deb11u2.debian/4.94.2-7+deb11u2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rwxr-xr-x | debian/tests/basic | 51 | ||||
-rw-r--r-- | debian/tests/control | 3 | ||||
-rw-r--r-- | debian/tests/long-header.msg | 6 |
3 files changed, 60 insertions, 0 deletions
diff --git a/debian/tests/basic b/debian/tests/basic new file mode 100755 index 0000000..7111cdc --- /dev/null +++ b/debian/tests/basic @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + +runandshow() { + count=0 + printf '===============\n%s: running ' $0 + for i in "$@" ; do + printf "argv[%i]=[%s] " "$count" "$i" + count=$(($count+1)) + done + echo + "$@" +} + +shouldfail() { +if runandshow "$@"; then + echo ... should have failed + exit 1 +else + : +fi +} + +exim=/usr/sbin/exim4 + + +runandshow $exim -bV +runandshow $exim -bt postmaster@localhost + +# Since example.com is not a local domain delivery should fail with the +# default dc_eximconfig_configtype=local +shouldfail $exim -bt invalid@example.com +runandshow $exim -be \ + '${lookup{exim4.conf.template}dsearch{/etc/exim4}{$value}fail}' +rc="$($exim -be \ + '${lookup{exim4.conf.template}dsearch{/etc/exim4}{$value}fail}')" +if [ "$rc" != "exim4.conf.template" ]; then + echo wrong expansion result $rc + false +fi + +runandshow swaks -s localhost -tlso -q ehlo +runandshow swaks -s localhost -tlso -f root@localhost -t postmaster@localhost \ + -q rcpt +shouldfail swaks -s localhost -tlso -f root@localhost \ + -t postmaster@localhost \ + --h-From 'From: Invalid Syntax <root@localhost' +shouldfail swaks -s localhost -tlso -f root@localhost \ + -t postmaster@localhost \ + --body `dirname $0`/long-header.msg diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..cf09fe7 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: basic +Depends: exim4, swaks, libnet-ssleay-perl +Restrictions: allow-stderr diff --git a/debian/tests/long-header.msg b/debian/tests/long-header.msg new file mode 100644 index 0000000..4df8d8d --- /dev/null +++ b/debian/tests/long-header.msg @@ -0,0 +1,6 @@ +To: postmaster@localhost +From: root@localhost +Subject: Fail long line +X-Ultralong-Line: 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 + +Body |