diff options
-rwxr-xr-x | check-mail-addr.pl | 17 |
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; +} |