ezmlmx 0.68
ezmlmx
Loading...
Searching...
No Matches
ezmlm-get.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "alloc.h"
#include "error.h"
#include "stralloc.h"
#include "str.h"
#include "env.h"
#include "sig.h"
#include "getconf.h"
#include "byte.h"
#include "getln.h"
#include "case.h"
#include "qmail.h"
#include "buffer.h"
#include "readwrite.h"
#include "seek.h"
#include "quote.h"
#include "datetime.h"
#include "now.h"
#include "date822fmt.h"
#include "fmt.h"
#include "getoptb.h"
#include "cookie.h"
#include "makehash.h"
#include "ezcopy.h"
#include "constmap.h"
#include "subscribe.h"
#include "hdr.h"
#include "open.h"
#include "lock.h"
#include "scan.h"
#include "idxthread.h"
#include "idx.h"
#include "mime.h"
#include "errtxt.h"
#include "auto_version.h"
#include "logmsg.h"
#include "lockfile.h"
#include "ezmlm.h"
Include dependency graph for ezmlm-get.c:

Go to the source code of this file.

Macros

#define WHO   "ezmlm-get"

Functions

ssize_t qqwrite (int fd, char *buf, unsigned int len)
int subto (char *s, unsigned int l)
void lockup ()
void unlock ()
void code_qput (char *s, unsigned int n)
void zapnonsub (char *szerr)
void tosender ()
void get_num ()
unsigned long dignum ()
void write_ulong (unsigned long num, unsigned long cum, unsigned long dat, char *fn, char *fnn)
void normal_bottom (char format)
void presub (unsigned long from, unsigned long to, stralloc *subject, int factype, char format)
void postsub (int factype, char format)
void postmsg (char format)
void copymsg (unsigned long msg, int fd, char format)
void mime_getbad (unsigned long msg)
void msgout (unsigned long msg, char format)
void digest (msgentry *msgtable, subentry *subtable, authentry *authtable, unsigned long from, unsigned long to, stralloc *subj, int factype, char format)
void doheaders ()
int main (int argc, char **argv)

Variables

int flagdo = 1
int flagbottom = 1
int flagpublic = 2
char flagcd = '\0'
int flagsub = 0
const char * digsz
stralloc outhost = {0}
stralloc outlocal = {0}
stralloc charset = {0}
char hboundary [HASHLEN]
stralloc listname = {0}
stralloc mailinglist = {0}
stralloc qmqpservers = {0}
stralloc fn = {0}
stralloc moddir = {0}
stralloc mydtline = {0}
stralloc digheaders = {0}
stralloc seed = {0}
struct constmap digheadersmap
char schar [] = "00_"
stralloc listno = {0}
datetime_sec when
unsigned long cumsize = 0L
unsigned long cumsizen = 0L
unsigned long max = 0L
unsigned long msgsize = 0L
datetime_sec digwhen
char szmsgnum [FMT_ULONG]
char boundary [COOKIE]
char hashout [COOKIE]
stralloc line = {0}
stralloc line2 = {0}
stralloc qline = {0}
stralloc quoted = {0}
stralloc msgnum = {0}
stralloc num = {0}
stralloc subject = {0}
stralloc archdate = {0}
stralloc archfrom = {0}
stralloc archto = {0}
stralloc archcc = {0}
stralloc archsubject = {0}
stralloc archmessageid = {0}
stralloc archkeywords = {0}
stralloc archblanklines = {0}
char archtype =' '
stralloc mod = {0}
const char * pmod = (char *) 0
stralloc ddir = {0}
stralloc edir = {0}
int act = AC_NONE
int flageditor = 0
struct stat st
int flaglocked = 0
int flagarchived
int flagindexed
int flagq = 0
char * dir
char * workdir
char * sender
char * digestcode
struct qmail qq
char qqbuf [1]
buffer bq = BUFFER_INIT(qqwrite,-1,qqbuf,sizeof(qqbuf))
char inbuf [1024]
buffer bi = BUFFER_INIT(read,0,inbuf,sizeof(inbuf))
buffer bj = BUFFER_INIT(read,0,inbuf,sizeof(inbuf))
buffer bn
char numbuf [16]
buffer bt
char textbuf [1024]
buffer bx
char indexbuf [1024]
int fdlock

Detailed Description

Author
Bruce Guenter, Fred Lindberg
Date
2005-04-07 19:23:29Z

Definition in file ezmlm-get.c.

Macro Definition Documentation

◆ WHO

#define WHO   "ezmlm-get"

Definition at line 42 of file ezmlm-get.c.

Function Documentation

◆ code_qput()

void code_qput ( char * s,
unsigned int n )

Definition at line 187 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copymsg()

void copymsg ( unsigned long msg,
int fd,
char format )

Definition at line 417 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ digest()

void digest ( msgentry * msgtable,
subentry * subtable,
authentry * authtable,
unsigned long from,
unsigned long to,
stralloc * subj,
int factype,
char format )

Definition at line 666 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dignum()

unsigned long dignum ( )

Definition at line 251 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doheaders()

void doheaders ( )

Definition at line 732 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_num()

void get_num ( )

Definition at line 238 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lockup()

void lockup ( )

Definition at line 169 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )

Definition at line 780 of file ezmlm-get.c.

Here is the call graph for this function:

◆ mime_getbad()

void mime_getbad ( unsigned long msg)

Definition at line 575 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msgout()

void msgout ( unsigned long msg,
char format )

Definition at line 593 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normal_bottom()

void normal_bottom ( char format)

Definition at line 302 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ postmsg()

void postmsg ( char format)

Definition at line 396 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ postsub()

void postsub ( int factype,
char format )

Definition at line 379 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ presub()

void presub ( unsigned long from,
unsigned long to,
stralloc * subject,
int factype,
char format )

Definition at line 340 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qqwrite()

ssize_t qqwrite ( int fd,
char * buf,
unsigned int len )

Definition at line 135 of file ezmlm-get.c.

Here is the call graph for this function:

◆ subto()

int subto ( char * s,
unsigned int l )

Definition at line 141 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tosender()

void tosender ( )

Definition at line 224 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unlock()

void unlock ( )

Definition at line 179 of file ezmlm-get.c.

Here is the caller graph for this function:

◆ write_ulong()

void write_ulong ( unsigned long num,
unsigned long cum,
unsigned long dat,
char * fn,
char * fnn )

Definition at line 268 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zapnonsub()

void zapnonsub ( char * szerr)

Definition at line 209 of file ezmlm-get.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ act

int act = AC_NONE

Definition at line 119 of file ezmlm-get.c.

◆ archblanklines

stralloc archblanklines = {0}

Definition at line 107 of file ezmlm-get.c.

◆ archcc

stralloc archcc = {0}

Definition at line 103 of file ezmlm-get.c.

◆ archdate

stralloc archdate = {0}

Definition at line 100 of file ezmlm-get.c.

◆ archfrom

stralloc archfrom = {0}

Definition at line 101 of file ezmlm-get.c.

◆ archkeywords

stralloc archkeywords = {0}

Definition at line 106 of file ezmlm-get.c.

◆ archmessageid

stralloc archmessageid = {0}

Definition at line 105 of file ezmlm-get.c.

◆ archsubject

stralloc archsubject = {0}

Definition at line 104 of file ezmlm-get.c.

◆ archto

stralloc archto = {0}

Definition at line 102 of file ezmlm-get.c.

◆ archtype

char archtype =' '

Definition at line 108 of file ezmlm-get.c.

◆ bi

buffer bi = BUFFER_INIT(read,0,inbuf,sizeof(inbuf))

Definition at line 153 of file ezmlm-get.c.

◆ bj

buffer bj = BUFFER_INIT(read,0,inbuf,sizeof(inbuf))

Definition at line 154 of file ezmlm-get.c.

◆ bn

buffer bn

Definition at line 156 of file ezmlm-get.c.

◆ boundary

char boundary[COOKIE]

Definition at line 89 of file ezmlm-get.c.

◆ bq

buffer bq = BUFFER_INIT(qqwrite,-1,qqbuf,sizeof(qqbuf))

Definition at line 150 of file ezmlm-get.c.

◆ bt

buffer bt

Definition at line 159 of file ezmlm-get.c.

◆ bx

buffer bx

Definition at line 162 of file ezmlm-get.c.

◆ charset

stralloc charset = {0}

Definition at line 64 of file ezmlm-get.c.

◆ cumsize

unsigned long cumsize = 0L

Definition at line 81 of file ezmlm-get.c.

◆ cumsizen

unsigned long cumsizen = 0L

Definition at line 82 of file ezmlm-get.c.

◆ ddir

stralloc ddir = {0}

Definition at line 116 of file ezmlm-get.c.

◆ digestcode

char* digestcode

Definition at line 131 of file ezmlm-get.c.

◆ digheaders

stralloc digheaders = {0}

Definition at line 73 of file ezmlm-get.c.

◆ digheadersmap

struct constmap digheadersmap

Definition at line 75 of file ezmlm-get.c.

◆ digsz

const char* digsz
Initial value:
=
"from\\to\\subject\\reply-to\\date\\message-id\\cc\\"
"mime-version\\content-type\\content-transfer-encoding"

Definition at line 55 of file ezmlm-get.c.

◆ digwhen

datetime_sec digwhen

Definition at line 85 of file ezmlm-get.c.

◆ dir

char* dir

Definition at line 128 of file ezmlm-get.c.

◆ edir

stralloc edir = {0}

Definition at line 117 of file ezmlm-get.c.

◆ fdlock

int fdlock

Definition at line 165 of file ezmlm-get.c.

◆ flagarchived

int flagarchived

Definition at line 124 of file ezmlm-get.c.

◆ flagbottom

int flagbottom = 1

Definition at line 51 of file ezmlm-get.c.

◆ flagcd

char flagcd = '\0'

Definition at line 53 of file ezmlm-get.c.

◆ flagdo

int flagdo = 1

Definition at line 50 of file ezmlm-get.c.

◆ flageditor

int flageditor = 0

Definition at line 120 of file ezmlm-get.c.

◆ flagindexed

int flagindexed

Definition at line 125 of file ezmlm-get.c.

◆ flaglocked

int flaglocked = 0

Definition at line 123 of file ezmlm-get.c.

◆ flagpublic

int flagpublic = 2

Definition at line 52 of file ezmlm-get.c.

◆ flagq

int flagq = 0

Definition at line 126 of file ezmlm-get.c.

◆ flagsub

int flagsub = 0

Definition at line 54 of file ezmlm-get.c.

◆ fn

stralloc fn = {0}

Definition at line 70 of file ezmlm-get.c.

◆ hashout

char hashout[COOKIE]

Definition at line 90 of file ezmlm-get.c.

◆ hboundary

char hboundary[HASHLEN]

Definition at line 65 of file ezmlm-get.c.

◆ inbuf

char inbuf[1024]

Definition at line 152 of file ezmlm-get.c.

◆ indexbuf

char indexbuf[1024]

Definition at line 163 of file ezmlm-get.c.

◆ line

stralloc line = {0}

Definition at line 91 of file ezmlm-get.c.

◆ line2

stralloc line2 = {0}

Definition at line 92 of file ezmlm-get.c.

◆ listname

stralloc listname = {0}

Definition at line 67 of file ezmlm-get.c.

◆ listno

stralloc listno = {0}

Definition at line 78 of file ezmlm-get.c.

◆ mailinglist

stralloc mailinglist = {0}

Definition at line 68 of file ezmlm-get.c.

◆ max

unsigned long max = 0L

Definition at line 83 of file ezmlm-get.c.

◆ mod

stralloc mod = {0}

Definition at line 112 of file ezmlm-get.c.

◆ moddir

stralloc moddir = {0}

Definition at line 71 of file ezmlm-get.c.

◆ msgnum

stralloc msgnum = {0}

Definition at line 95 of file ezmlm-get.c.

◆ msgsize

unsigned long msgsize = 0L

Definition at line 84 of file ezmlm-get.c.

◆ mydtline

stralloc mydtline = {0}

Definition at line 72 of file ezmlm-get.c.

◆ num

stralloc num = {0}

Definition at line 96 of file ezmlm-get.c.

◆ numbuf

char numbuf[16]

Definition at line 157 of file ezmlm-get.c.

◆ outhost

stralloc outhost = {0}

Definition at line 62 of file ezmlm-get.c.

◆ outlocal

stralloc outlocal = {0}

Definition at line 63 of file ezmlm-get.c.

◆ pmod

const char* pmod = (char *) 0

Definition at line 113 of file ezmlm-get.c.

◆ qline

stralloc qline = {0}

Definition at line 93 of file ezmlm-get.c.

◆ qmqpservers

stralloc qmqpservers = {0}

Definition at line 69 of file ezmlm-get.c.

◆ qq

struct qmail qq

Definition at line 133 of file ezmlm-get.c.

◆ qqbuf

char qqbuf[1]

Definition at line 149 of file ezmlm-get.c.

◆ quoted

stralloc quoted = {0}

Definition at line 94 of file ezmlm-get.c.

◆ schar

char schar[] = "00_"

Definition at line 77 of file ezmlm-get.c.

◆ seed

stralloc seed = {0}

Definition at line 74 of file ezmlm-get.c.

◆ sender

char* sender

Definition at line 130 of file ezmlm-get.c.

◆ st

struct stat st

Definition at line 121 of file ezmlm-get.c.

◆ subject

stralloc subject = {0}

Definition at line 97 of file ezmlm-get.c.

◆ szmsgnum

char szmsgnum[FMT_ULONG]

Definition at line 88 of file ezmlm-get.c.

◆ textbuf

char textbuf[1024]

Definition at line 160 of file ezmlm-get.c.

◆ when

Definition at line 80 of file ezmlm-get.c.

◆ workdir

char* workdir

Definition at line 129 of file ezmlm-get.c.