File: network-no-delivery

package info (click to toggle)
swaks 20201014.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 676 kB
  • sloc: perl: 2,959; makefile: 47; sh: 24
file content (34 lines) | stat: -rwxr-xr-x 627 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/sh

set -e

printandrun()
{
        echo "$@"
        "$@"
}

printandexpectfail()
{
        echo "[SHOULD FAIL] $@"
        if "$@" ; then
		echo "command should have failed"
		exit 1
	else
		true
	fi
}

printandrun \
	./swaks -s localhost -tlso -f '<>' -t postmaster@localhost -q rcpt

printandrun \
	./swaks -tls -f '<>' \
		-t swaks@packages.debian.org -q ehlo

# Cannot check positive tls-cert verification against Debian servers
# since Debian SMTP SSL certs are not trusted by ca-certificates.

printandexpectfail \
	./swaks -tls --tls-verify --tls-ca-path `pwd` -f '<>' \
		-t swaks@packages.debian.org -q ehlo