--- /dev/null
+#!/bin/sh
+
+test_postmap () {
+ echo -n "get $1, port 2244:"
+ postmap -v -q $1 tcp:localhost:2244 2>&1 |grep recv:
+ echo -n "get $1, port 4242:"
+ postmap -v -q $1 tcp:localhost:4242 2>&1 |grep recv:
+ echo
+}
+
+test_postmap dummy
+test_postmap dummy@dev.bitmask.net
+test_postmap dummy@nowhe.re
+
+test_postmap nobody
+test_postmap nobody@dev.bitmask.net
+test_postmap nobody@nowhe.re
--- /dev/null
+#!/bin/sh
+
+local='dummy@dev.bitmask.net'
+nobody_local='fooooooo@dev.bitmask.net'
+external='dummy@zeromail.org'
+
+swaks_options='--server localhost --tls --hide-informational --suppress-data'
+swaks_auth='--tls-cert /root/cert.crt --tls-key /root/cert.key'
+
+test_swaks() {
+ from=$1
+ to=$2
+
+ echo -n "From $from, to $to, no authentication:"
+ swaks -f $from -t $to $swaks_options | tail -3 | head -1
+
+ echo -n "From $from, to $to, with authentication:"
+ swaks -f $from -t $to $swaks_options $swaks_auth | tail -3 | head -1
+ echo
+}
+
+test_swaks $local $local
+test_swaks $local $nobody_local
+test_swaks $local $external
+
+echo
+
+test_swaks $nobody_local $local
+test_swaks $nobody_local $nobody_local
+test_swaks $nobody_local $external
+
+echo
+
+test_swaks $external $local
+test_swaks $external $nobody_local
+test_swaks $external $external
+
+
+
+