Exemple #1
0
#include "subdb.h"
#include "wrap.h"
#include "config.h"
#include "auto_version.h"

const char FATAL[] = "ezmlm-gate: fatal: ";
const char USAGE[] =
"ezmlm-gate: usage: ezmlm-gate [-cCmMpPqrRsSvV] dir [moddir [...]]";

static const char *queryext = (char *) 0;
static int dontact = 0;
static stralloc sendopt = {0};
static stralloc storeopt = {0};

static struct option options[] = {
  OPT_COPY_FLAG(sendopt,'c'),
  OPT_COPY_FLAG(sendopt,'C'),
  OPT_COPY_FLAG(sendopt,'r'),
  OPT_COPY_FLAG(sendopt,'R'),
  OPT_COPY_FLAG(sendopt,'Q'),
  OPT_COPY_FLAG(storeopt,'m'),
  OPT_COPY_FLAG(storeopt,'M'),
  OPT_COPY_FLAG(storeopt,'p'),
  OPT_COPY_FLAG(storeopt,'P'),
  OPT_COPY_FLAG(storeopt,'s'),
  OPT_COPY_FLAG(storeopt,'S'),
  OPT_COPY_FLAG(storeopt,'y'),
  OPT_COPY_FLAG(storeopt,'Y'),
  OPT_CSTR(queryext,'q',0),
  OPT_FLAG(dontact,'0',1,0),
  OPT_END
Exemple #2
0
#include "wrap.h"
#include "config.h"
#include "auto_version.h"

const char FATAL[] = "ezmlm-moderate: fatal: ";
const char INFO[] = "ezmlm-moderate: info: ";
const char USAGE[] =
"ezmlm-moderate: usage: ezmlm-moderate [-cCmMrRvV] [-t replyto] dir [/path/ezmlm-send]";

static const char *replyto = (char *) 0;
static int flagmime = MOD_MIME;	/* default is message as attachment */

static stralloc sendopt = {0};

static struct option options[] = {
  OPT_COPY_FLAG(sendopt,'c'),
  OPT_COPY_FLAG(sendopt,'C'),
  OPT_COPY_FLAG(sendopt,'r'),
  OPT_COPY_FLAG(sendopt,'R'),
  OPT_FLAG(flagmime,'m',1,0),
  OPT_FLAG(flagmime,'M',0,0),
  OPT_CSTR(replyto,'t',0),
  OPT_CSTR(replyto,'T',0),
  OPT_END
};

stralloc mydtline = {0};
stralloc accept = {0};
stralloc reject = {0};
stralloc to = {0};
stralloc send = {0};