67 lines
1.8 KiB
Text
67 lines
1.8 KiB
Text
Index: bin/smtp-vilter/smtp-vilter.c
|
|
--- bin/smtp-vilter/smtp-vilter.c.orig
|
|
+++ bin/smtp-vilter/smtp-vilter.c
|
|
@@ -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':
|
|
@@ -408,6 +411,13 @@ main(int argc, char *argv[])
|
|
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':
|
|
ldaphost = optarg;
|
|
@@ -916,9 +926,10 @@ main(int argc, char *argv[])
|
|
time(&now);
|
|
if ((fp = fopen(statfile, "a")) !=
|
|
NULL) {
|
|
- fprintf(fp, "%u\t%u\t%u\t%u\t"
|
|
+ fprintf(fp, "%lld\t%lld\t%u\t%u\t"
|
|
"%u\t%u\t%u\t%u\t%u\n",
|
|
- stat_begin, now, n_conn,
|
|
+ (long long)stat_begin,
|
|
+ (long long)now, n_conn,
|
|
n_aborts, n_msgs,
|
|
n_virus, n_spam,
|
|
n_unwanted, n_err);
|