summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-04-05 12:33:38 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-04-05 12:33:38 +0200
commite53a573b9b927cb1a93defb4a2bf28f56642d26a (patch)
treee60724845c47c1f6f70616b2c05a72e99b03b367
parentcfc8198ba8f71144468bda44147705d36b07bc63 (diff)
downloadbin-e53a573b9b927cb1a93defb4a2bf28f56642d26a.tar.gz
bin-e53a573b9b927cb1a93defb4a2bf28f56642d26a.tar.xz
add check-mail-addr.pl
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-rwxr-xr-xcheck-mail-addr.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/check-mail-addr.pl b/check-mail-addr.pl
new file mode 100755
index 0000000..f50ed3c
--- /dev/null
+++ b/check-mail-addr.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Mail::CheckUser qw(check_email last_check);
+use File::Basename;
+
+if(@ARGV != 1) {
+ print "usage: ", basename($0), " <emailaddress>\n";
+ exit 2;
+}
+
+if(check_email($ARGV[0])) {
+ exit 0;
+} else {
+ print last_check()->{reason}, "\n";
+ exit 1;
+}