[debian-edu-commits] debian-edu/ 01/02: Add new SMTP test to check that the SMTP server is accepting email. Depend on swaks to get a tool to do this.
Petter Reinholdtsen
pere at moszumanska.debian.org
Fri Oct 3 14:44:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository debian-edu-config.
commit 6750171448382dd53dbaa92f95baec29946a7f4c
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Fri Oct 3 16:41:40 2014 +0200
Add new SMTP test to check that the SMTP server is accepting email. Depend on swaks to get a tool to do this.
---
debian/changelog | 2 ++
debian/control | 1 +
testsuite/postoffice | 10 ++++++++++
3 files changed, 13 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8673dd4..7673d61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,8 @@ debian-edu-config (1.807) UNRELEASED; urgency=high
It is more robust to only use http.
* Run apt-get autoremove at the end of the installation to get rid of
no longer needed dependencies.
+ * Add new SMTP test to check that the SMTP server is accepting email.
+ Depend on swaks to get a tool to do this.
-- Wolfgang Schweer <wschweer at arcor.de> Thu, 02 Oct 2014 21:40:29 +0200
diff --git a/debian/control b/debian/control
index 5d1d73f..7156a86 100644
--- a/debian/control
+++ b/debian/control
@@ -56,6 +56,7 @@ Depends: ${misc:Depends}
, libproxy1-plugin-mozjs
, libproxy1-plugin-kconfig
, uuid
+ , swaks
Recommends: resolvconf, ddccontrol | xresprobe, syslinux, memtest86+, libnotify-bin, lsof, binutils
Suggests: atftpd | tftpd-hpa
Breaks: nslcd (<< 0.7.7), dhcp3-client (<< 4.1.1-P1-9), dhcp3-server (<< 4.1.1-P1-9), slapd (<< 2.4.23-5), debian-edu-install (<< 1.521~svn74617)
diff --git a/testsuite/postoffice b/testsuite/postoffice
index ecaf653..98af295 100755
--- a/testsuite/postoffice
+++ b/testsuite/postoffice
@@ -41,4 +41,14 @@ Regards,
EOF
+tmpfile=$(tempfile)
+smtpserver=postoffice.intern
+if swaks --to root at postoffice.intern --server $smtpserver > $tmpfile; then
+ echo "success: $0: SMTP to $smtpserver worked, email to root sent."
+else
+ echo "error: $0: SMTP to $smtpserver did not work."
+ sed "s%^%info: $0: swaks: %" < $tmpfile
+fi
+rm $tmpfile
+
exit $retval
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list