$OpenBSD: patch-bin_smtp-vilter_smtp-vilter_c,v 1.3 2014/01/23 15:45:18 jasper Exp $
--- bin/smtp-vilter/smtp-vilter.c.orig	Sun Jan 21 13:09:38 2007
+++ bin/smtp-vilter/smtp-vilter.c	Fri Oct 23 16:35:17 2009
@@ -22,6 +22,7 @@
 #include <sys/resource.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <sys/limits.h>
 
 #include <ctype.h>
 #include <dlfcn.h>
@@ -82,6 +83,7 @@ char	*clean_table;
 
 int	 markall;
 int	 logall;
+unsigned long header_options;
 int	 verbose;
 char	*cfgfile;
 char	*tmpdir;
@@ -210,6 +212,7 @@ usage(void)
 #ifdef ENABLE_LDAP
 	    " [-h ldaphost]"
 #endif
+	    " [-H header-options]"
 	    " [-i interval]"
 #ifdef ENABLE_LDAP
 	    " [-L ldapport]"
@@ -358,10 +361,10 @@ main(int argc, char *argv[])
 	/* Process the commandline */
 #ifdef ENABLE_LDAP	
 	while ((ch = getopt(argc, argv,
-	    "A:a:B:b:C:D:d:e:f:g:h:i:kL:mn:o:p:s:T:t:u:U:Vvw:xZ?")) != -1) {
+	    "A:a:B:b:C:D:d:e:f:g:h:H:i:kL:mn:o:p:s:T:t:u:U:Vvw:xZ?")) != -1) {
 #else
 	while ((ch = getopt(argc, argv,
-	    "A:a:b:C:d:e:f:g:i:kmn:o:p:T:t:s:u:VvxZ?")) != -1) {
+	    "A:a:b:C:d:e:f:g:H:i:kmn:o:p:T:t:s:u:VvxZ?")) != -1) {
 #endif
 		switch (ch) {
 		case 'A':
@@ -407,6 +410,13 @@ main(int argc, char *argv[])
 			break; 
 		case 'g':
 			group = optarg;
+			break;
+		case 'H':
+			header_options = (unsigned long)strtonum(optarg, 0LL,
+			    (long long)ULONG_MAX, &errstr);
+			if (errstr)
+				errx(1, "header options is %s: %s",
+				    errstr, optarg);
 			break;
 #ifdef ENABLE_LDAP
 		case 'h':
