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

Go to the source code of this file.

Macros

#define WHO   "ezmlm-send"

Functions

void die_indexn ()
ssize_t mywrite (int fd, char *buf, unsigned int len)
int subto (char *s, unsigned int l)
void die_archive ()
void die_numnew ()
void qa_put (char *buf, unsigned int len)
void qa_puts (char *buf)
int sublistmatch (char *sender)
void numwrite ()
int idx_copy_insertsubject ()
 copies old index file up to but not including msg, then adds a line with 'sub' trimmed of reply indicators, then closes the new index and moves it to the name 'index'. Errors are dealt with directly, and if the routine returns, it was successful. 'fatal' points to a program-specific error string. Sub is not destroyed, but from is!!! returns 1 if reply-indicators were found, 0 otherwise. no terminal
or \0 in any of the strallocs!
void getcharset ()
int main (int argc, char **argv)

Variables

int flagnoreceived = 1
int flaglog = 1
buffer bxn
char indexnbuf [1024]
char szmsgnum [FMT_ULONG]
char hash [HASHLEN]
char hboundary [HASHLEN]
stralloc fnadir = {0}
stralloc fnaf = {0}
stralloc fnif = {0}
stralloc fnifn = {0}
stralloc fnsub = {0}
stralloc line = {0}
stralloc qline = {0}
stralloc lines = {0}
stralloc subject = {0}
stralloc from = {0}
stralloc received = {0}
stralloc prefix = {0}
stralloc content = {0}
stralloc charset = {0}
stralloc dcprefix = {0}
stralloc dummy = {0}
stralloc qmqpservers = {0}
stralloc boundary = {0}
unsigned long innum
unsigned long outnum
unsigned long msgnum
unsigned long hash_lo = 0L
unsigned long hash_hi = 52L
unsigned long msgsize = 0L
unsigned long cumsize = 0L
char flagcd = '\0'
char encin = '\0'
int flagindexed
int flagfoundokpart
int flagreceived
int flagprefixed
unsigned int serial = 0
int flagarchived
int fdarchive
int fdindex
int fdindexn
char hashout [COOKIE+1]
buffer bar
char archivebuf [1024]
stralloc outhost = {0}
stralloc outlocal = {0}
int flagsublist
stralloc sublist = {0}
stralloc mailinglist = {0}
stralloc headerremove = {0}
struct constmap headerremovemap
stralloc mimeremove = {0}
struct constmap mimeremovemap
char * dir
struct qmail qq
buffer bi
char inbuf [1024]
buffer bo
char outbuf [1]
char textbuf [512]
buffer bt
buffer bn
char numnewbuf [16]
stralloc mydtline = {0}

Detailed Description

@auther Dan Bernstein, Bruce Guenter

Date
2005-02-09 21:28:36Z

Definition in file ezmlm-send.c.

Macro Definition Documentation

◆ WHO

#define WHO   "ezmlm-send"

Definition at line 37 of file ezmlm-send.c.

Function Documentation

◆ die_archive()

void die_archive ( )

Definition at line 144 of file ezmlm-send.c.

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

◆ die_indexn()

void die_indexn ( )

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

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

◆ die_numnew()

void die_numnew ( )

Definition at line 145 of file ezmlm-send.c.

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

◆ getcharset()

void getcharset ( )

Definition at line 320 of file ezmlm-send.c.

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

◆ idx_copy_insertsubject()

int idx_copy_insertsubject ( )

copies old index file up to but not including msg, then adds a line with 'sub' trimmed of reply indicators, then closes the new index and moves it to the name 'index'. Errors are dealt with directly, and if the routine returns, it was successful. 'fatal' points to a program-specific error string. Sub is not destroyed, but from is!!! returns 1 if reply-indicators were found, 0 otherwise. no terminal
or \0 in any of the strallocs!

Definition at line 219 of file ezmlm-send.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 336 of file ezmlm-send.c.

Here is the call graph for this function:

◆ mywrite()

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

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

Here is the call graph for this function:

◆ numwrite()

void numwrite ( )

Definition at line 184 of file ezmlm-send.c.

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

◆ qa_put()

void qa_put ( char * buf,
unsigned int len )

Definition at line 147 of file ezmlm-send.c.

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

◆ qa_puts()

void qa_puts ( char * buf)

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

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

◆ sublistmatch()

int sublistmatch ( char * sender)

Definition at line 161 of file ezmlm-send.c.

Here is the caller graph for this function:

◆ subto()

int subto ( char * s,
unsigned int l )

Definition at line 136 of file ezmlm-send.c.

Here is the call graph for this function:

Variable Documentation

◆ archivebuf

char archivebuf[1024]

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

◆ bar

buffer bar

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

◆ bi

buffer bi

Definition at line 122 of file ezmlm-send.c.

◆ bn

buffer bn

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

◆ bo

buffer bo

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

◆ boundary

stralloc boundary = {0}

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

◆ bt

buffer bt

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

◆ bxn

buffer bxn

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

◆ charset

stralloc charset = {0}

Definition at line 76 of file ezmlm-send.c.

◆ content

stralloc content = {0}

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

◆ cumsize

unsigned long cumsize = 0L

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

◆ dcprefix

stralloc dcprefix = {0}

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

◆ dir

char* dir

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

◆ dummy

stralloc dummy = {0}

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

◆ encin

char encin = '\0'

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

◆ fdarchive

int fdarchive

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

◆ fdindex

int fdindex

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

◆ fdindexn

int fdindexn

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

◆ flagarchived

int flagarchived

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

◆ flagcd

char flagcd = '\0'

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

◆ flagfoundokpart

int flagfoundokpart

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

◆ flagindexed

int flagindexed

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

◆ flaglog

int flaglog = 1

Definition at line 47 of file ezmlm-send.c.

◆ flagnoreceived

int flagnoreceived = 1

Definition at line 45 of file ezmlm-send.c.

◆ flagprefixed

int flagprefixed

Definition at line 98 of file ezmlm-send.c.

◆ flagreceived

int flagreceived

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

◆ flagsublist

int flagsublist

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

◆ fnadir

stralloc fnadir = {0}

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

◆ fnaf

stralloc fnaf = {0}

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

◆ fnif

stralloc fnif = {0}

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

◆ fnifn

stralloc fnifn = {0}

Definition at line 66 of file ezmlm-send.c.

◆ fnsub

stralloc fnsub = {0}

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

◆ from

stralloc from = {0}

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

◆ hash

char hash[HASHLEN]

Definition at line 60 of file ezmlm-send.c.

◆ hash_hi

unsigned long hash_hi = 52L

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

◆ hash_lo

unsigned long hash_lo = 0L

Definition at line 87 of file ezmlm-send.c.

◆ hashout

char hashout[COOKIE+1]

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

◆ hboundary

char hboundary[HASHLEN]

Definition at line 61 of file ezmlm-send.c.

◆ headerremove

stralloc headerremove = {0}

Definition at line 115 of file ezmlm-send.c.

◆ headerremovemap

struct constmap headerremovemap

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

◆ inbuf

char inbuf[1024]

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

◆ indexnbuf

char indexnbuf[1024]

Definition at line 56 of file ezmlm-send.c.

◆ innum

unsigned long innum

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

◆ line

stralloc line = {0}

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

◆ lines

stralloc lines = {0}

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

◆ mailinglist

stralloc mailinglist = {0}

Definition at line 114 of file ezmlm-send.c.

◆ mimeremove

stralloc mimeremove = {0}

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

◆ mimeremovemap

struct constmap mimeremovemap

Definition at line 118 of file ezmlm-send.c.

◆ msgnum

unsigned long msgnum

Definition at line 86 of file ezmlm-send.c.

◆ msgsize

unsigned long msgsize = 0L

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

◆ mydtline

stralloc mydtline = {0}

Definition at line 205 of file ezmlm-send.c.

◆ numnewbuf

char numnewbuf[16]

Definition at line 180 of file ezmlm-send.c.

◆ outbuf

char outbuf[1]

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

◆ outhost

stralloc outhost = {0}

Definition at line 109 of file ezmlm-send.c.

◆ outlocal

stralloc outlocal = {0}

Definition at line 110 of file ezmlm-send.c.

◆ outnum

unsigned long outnum

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

◆ prefix

stralloc prefix = {0}

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

◆ qline

stralloc qline = {0}

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

◆ qmqpservers

stralloc qmqpservers = {0}

Definition at line 79 of file ezmlm-send.c.

◆ qq

struct qmail qq

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

◆ received

stralloc received = {0}

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

◆ serial

unsigned int serial = 0

Definition at line 99 of file ezmlm-send.c.

◆ subject

stralloc subject = {0}

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

◆ sublist

stralloc sublist = {0}

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

◆ szmsgnum

char szmsgnum[FMT_ULONG]

Definition at line 59 of file ezmlm-send.c.

◆ textbuf

char textbuf[512]

Definition at line 127 of file ezmlm-send.c.