diff -r 44778d21edad -r 88d7744d11fc .hgignore
--- a/.hgignore	Sun Dec 05 19:13:25 2010 +1100
+++ b/.hgignore	Sun Dec 05 19:16:09 2010 +1100
@@ -29,6 +29,7 @@
 ^src/mlmmj-receive$
 ^src/mlmmj-send$
 ^src/mlmmj-sub$
+^src/mlmmj-subbed$
 ^src/mlmmj-unsub$
 
 # Other generated files
diff -r 44778d21edad -r 88d7744d11fc src/Makefile.am
--- a/src/Makefile.am	Sun Dec 05 19:13:25 2010 +1100
+++ b/src/Makefile.am	Sun Dec 05 19:16:09 2010 +1100
@@ -6,7 +6,8 @@
 INCLUDES = -I$(srcdir)/../include
 
 bin_PROGRAMS = mlmmj-send mlmmj-receive mlmmj-process mlmmj-sub \
-               mlmmj-unsub mlmmj-bounce mlmmj-maintd mlmmj-list
+               mlmmj-unsub mlmmj-bounce mlmmj-maintd mlmmj-list \
+					mlmmj-subbed
 
 bin_SCRIPTS = mlmmj-make-ml
 
@@ -45,6 +46,9 @@
 			prepstdreply.c memory.c statctrl.c readn.c \
 			getlistdelim.c unistr.c ctrlvalue.c
 			
+mlmmj_subbed_SOURCES = mlmmj-subbed.c subscriberfuncs.c print-version.c \
+			log_error.c mygetline.c memory.c strgen.c random-int.c readn.c
+
 mlmmj_bounce_SOURCES = mlmmj-bounce.c print-version.c log_error.c \
 		       subscriberfuncs.c strgen.c random-int.c writen.c \
 		       prepstdreply.c mygetline.c chomp.c getlistaddr.c \
diff -r 44778d21edad -r 88d7744d11fc src/mlmmj-subbed.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/mlmmj-subbed.c	Sun Dec 05 19:16:09 2010 +1100
@@ -0,0 +1,126 @@
+/* Copyright (C) 2002, 2003 Mads Martin Joergensen <mmj at mmj.dk>
+ *
+ * $Id$
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <sys/wait.h>
+#include <ctype.h>
+
+#include "mlmmj.h"
+#include "mlmmj-sub.h"
+#include "mylocking.h"
+#include "wrappers.h"
+#include "getlistaddr.h"
+#include "getlistdelim.h"
+#include "strgen.h"
+#include "subscriberfuncs.h"
+#include "log_error.h"
+#include "mygetline.h"
+#include "statctrl.h"
+#include "prepstdreply.h"
+#include "memory.h"
+#include "ctrlvalues.h"
+#include "chomp.h"
+
+static void print_help(const char *prg)
+{
+	printf("Usage: %s -L /path/to/list -a john@doe.org\n"
+	       "       [-h] [-V]\n"
+	       " -a: Email address to check\n"
+	       " -h: This help\n"
+	       " -L: Full path to list directory\n"
+	       " -V: Print version\n", prg);
+	exit(0);
+}
+
+int main(int argc, char **argv)
+{
+	char *listdir = NULL, *address = NULL;
+	char *lowcaseaddr;
+	int opt, i, subbed;
+
+	CHECKFULLPATH(argv[0]);
+
+	log_set_name(argv[0]);
+
+	while ((opt = getopt(argc, argv, "hVUL:a:")) != -1) {
+		switch(opt) {
+		case 'a':
+			address = optarg;
+			break;
+		case 'h':
+			print_help(argv[0]);
+			break;
+		case 'L':
+			listdir = optarg;
+			break;
+		case 'V':
+			print_version(argv[0]);
+			exit(0);
+		}
+	}
+
+	if(listdir == NULL) {
+		fprintf(stderr, "You have to specify -L\n");
+		fprintf(stderr, "%s -h for help\n", argv[0]);
+		exit(2);
+	}
+	
+	if(address == NULL) {
+		fprintf(stderr, "You have to specify -a\n");
+		fprintf(stderr, "%s -h for help\n", argv[0]);
+		exit(2);
+	}
+
+	if(strchr(address, '@') == NULL) {
+		exit(2);
+	}
+
+	/* Make the address lowercase */
+	lowcaseaddr = mystrdup(address);
+	i = 0;
+	while(lowcaseaddr[i]) {
+		lowcaseaddr[i] = tolower(lowcaseaddr[i]);
+		i++;
+	}
+	address = lowcaseaddr;
+
+	subbed = is_subbed(listdir, address);
+
+	myfree(address);
+
+	if(subbed) {
+		printf("no\n");
+		return 1;
+	}
+	printf("yes\n");
+	return 0;
+}


