forked from kingsoho/node-poplib
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtls.sh
More file actions
27 lines (19 loc) · 878 Bytes
/
tls.sh
File metadata and controls
27 lines (19 loc) · 878 Bytes
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
#!/bin/sh
RANDOMID=$RANDOM
print_test "Sending test message to $EMAIL (str: $RANDOMID)"
OUTPUT=`./sendmail.sh -q 1 $EMAIL "subject with $RANDOMID" "body with $RANDOMID"`
print_result 0 $OUTPUT
print_test "Wrong port"
OUTPUT=`node tls.js --username $USER --password $PASS --host $HOST --port $PORT --login off`;
print_result 1 $OUTPUT
print_test "No login"
OUTPUT=`node tls.js --username $USER --password $PASS --host $HOST --port $TLSPORT --login off`;
print_result 0 $OUTPUT
print_test "Login only"
OUTPUT=`node tls.js --username $USER --password $PASS --host $HOST --port $TLSPORT --login on`;
print_result 0 $OUTPUT
print_test "Login and message download"
OUTPUT=`node tls.js --username $USER --password $PASS --host $HOST --port $TLSPORT --login on --download on`
OUTPUT=`echo $OUTPUT | grep $RANDOMID`
if [ $? -eq 1 ]; then OUTPUT="fail"; fi
print_result 0 $OUTPUT