Skip to content

Commit d8dd15d

Browse files
committed
- [privatedial](src/privatedial) Allow all TLS protocols in the minivm-send bash script.
- [test](test/Makefile) Now also test the PHP is setup correctly.
1 parent fc638c1 commit d8dd15d

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.1.4
2+
3+
- [privatedial](src/privatedial) Allow all TLS protocols in the `minivm-send` bash script.
4+
- [test](test/Makefile) Now also test the PHP is setup correctly.
5+
16
# 1.1.3
27

38
- [repo](src) Fix the bug; websms and autoban not working. We need to use softlinks to ../../share/php81/.

src/privatedial/bin/minivm-send

+9-6
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ done
4343
#
4444
case "$sendmail_proto" in
4545
starttls)
46-
sendmail_args+=("-H" "openssl s_client -quiet -tls1 -starttls smtp -connect $sendmail_host") ;;
46+
sendmail_args+=("-H" "openssl s_client -quiet -starttls smtp -connect $sendmail_host") ;;
4747
smtps|tls)
48-
sendmail_args+=("-H" "openssl s_client -quiet -tls1 -connect $sendmail_host") ;;
48+
sendmail_args+=("-H" "openssl s_client -quiet -connect $sendmail_host") ;;
4949
smtp|*)
5050
sendmail_args+=("-S" "$sendmail_host") ;;
5151
esac
@@ -55,15 +55,18 @@ esac
5555
# Asterisk pass the message via stdin to this script and
5656
# that stream is inherited here
5757
#
58-
sendmail "${sendmail_args[@]}" &>/dev/null
59-
sendmail_extival=$?
58+
sendmail_output=$(sendmail "${sendmail_args[@]}" 2>&1)
59+
sendmail_exitval=$?
60+
sendmail_cmd="sendmail ${sendmail_args[@]}"
6061

6162
#
6263
# Log sendmail status and exit
6364
#
64-
if [ $sendmail_extival -eq 0 ]; then
65+
if [ $sendmail_exitval -eq 0 ]; then
6566
logger "${logger_args[@]}" -p mail.info "INFO: Successfully sent mail ($sendmail_host)"
6667
else
6768
logger "${logger_args[@]}" -p mail.err "ERROR: Unable to send mail ($sendmail_host)"
69+
logger "${logger_args[@]}" -p mail.err "$sendmail_cmd"
70+
logger "${logger_args[@]}" -p mail.err "$sendmail_output"
6871
fi
69-
exit $sendmail_extival
72+
exit $sendmail_exitval

test/Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ps:
5858
test-all: $(addprefix test_,1 2 3 4)
5959

6060

61-
test_%: test-up_% test-wait_% test-logs_% test-ping_% test-down_%
61+
test_%: test-up_% test-wait_% test-logs_% test-autoban_% test-ping_% test-down_%
6262

6363

6464
test-up_1: test-up-net
@@ -108,6 +108,9 @@ test-ping_%: test-version_%
108108
test-version_%:
109109
docker exec -it $(PBX_NAME) asterisk -x "pjsip show version" | grep PJPROJECT
110110

111+
test-autoban_%:
112+
case $* in [2-3]) docker exec -it $(PBX_NAME) autoban;; esac
113+
111114
test-logs_%:
112115
docker container logs $(PBX_NAME) | grep 'docker-entrypoint.sh' || true
113116

0 commit comments

Comments
 (0)