Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/msmtpq/README.msmtpq
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ set sendmail = "EMAIL_CONN_TEST=P /path/to/msmtpq"
set sendmail = "EMAIL_CONN_TEST=n /path/to/msmtpq"
# use queue with netcat connection test
# (netcat must be installed on user's system)
set sendmail = "EMAIL_CONN_TEST=c /path/to/msmtpq"
# use queue with curl connection test
# (curl must be installed on user's system)
set sendmail = "EMAIL_CONN_TEST=s /path/to/msmtpq"
# use queue with sh sockets connection test
# (this does *not* work on Debian systems ;
Expand Down
8 changes: 7 additions & 1 deletion scripts/msmtpq/msmtpq
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
## if =p or unset will use a ping test (debian.org) for a connection
## if =P will use a fast ping test (8.8.8.8) for a connection
## if =n will use netcat (nc) to test for a connection
## if =c will use curl to test for a connection
## if =s will use bash sockets to test for a connection
## EMAIL_QUEUE_QUIET if set will cause suppression of messages and 'chatter'
## (perhaps useful for some of the emacs mail clients)
Expand All @@ -56,7 +57,7 @@
## ======================================================================================
##
#EMAIL_CONN_NOTEST=y # deprecated ; use below var
#EMAIL_CONN_TEST={x| |p|P|n|s|q} # see settings above for EMAIL_CONN_TEST
#EMAIL_CONN_TEST={x| |p|P|n|c|s|q} # see settings above for EMAIL_CONN_TEST
## ======================================================================================

## two essential patches by Philipp Hartwig
Expand Down Expand Up @@ -311,6 +312,11 @@ connect_test() {
command -v nc >/dev/null 2>&1 || \
log -e 1 "msmtpq : can't find netcat executable [ nc ]"
'nc' -vz -w 5 www.debian.org 80 >/dev/null 2>&1 || return 1
elif [ "$EMAIL_CONN_TEST" = 'c' ] ; then # use curl test, for iphone hotspot
# must, of course, have curl installed
command -v curl >/dev/null 2>&1 || \
log -e 1 "msmtpq : can't find curl executable [ curl ]"
curl -sSfI https://www.debian.org/ -o /dev/null || return 1
elif [ "$EMAIL_CONN_TEST" = 's' ] ; then # use sh sockets test
# note that this does not work on debian systems
# where bash opened sockets are suppressed for security
Expand Down