s/qmail 4.2.29a
Next generation secure email transport
Loading...
Searching...
No Matches
Macros | Functions | Variables
qmail-inject.c File Reference
#include <unistd.h>
#include "sig.h"
#include "buffer.h"
#include "genalloc.h"
#include "stralloc.h"
#include "getoptb.h"
#include "getln.h"
#include "alloc.h"
#include "str.h"
#include "fmt.h"
#include "hfield.h"
#include "token822.h"
#include "control.h"
#include "env.h"
#include "qmail.h"
#include "now.h"
#include "exit.h"
#include "error.h"
#include "quote.h"
#include "headerbody.h"
#include "auto_qmail.h"
#include "newfield.h"
#include "constmap.h"
Include dependency graph for qmail-inject.c:

Go to the source code of this file.

Macros

#define LINELEN   80
 
#define RECIP_DEFAULT   1
 
#define RECIP_ARGS   2
 
#define RECIP_HEADER   3
 
#define RECIP_AH   4
 

Functions

void out (char *s, int len)
 
void outs (char *s)
 
void perm ()
 
void temp ()
 
void die_nomem ()
 
void die_invalid (stralloc *sa)
 
void die_qqt ()
 
void die_chdir ()
 
void die_read ()
 
void doordie (stralloc *sa, int r)
 
 GEN_ALLOC_typedef (GEN_ALLOC_readyplus(saa, GEN_ALLOC_readyplus(stralloc, GEN_ALLOC_readyplus(sa, GEN_ALLOC_readyplus(len, GEN_ALLOC_readyplus(a)
 
void exitnicely ()
 
void savedh_append (stralloc *h)
 
void savedh_print ()
 
void rwroute (token822_alloc *addr)
 
void rwextraat (token822_alloc *addr)
 
void rwextradot (token822_alloc *addr)
 
void rwnoat (token822_alloc *addr)
 
void rwnodot (token822_alloc *addr)
 
void rwplus (token822_alloc *addr)
 
void rwgeneric (token822_alloc *addr)
 
int setreturn (token822_alloc *addr)
 
int rwreturn (token822_alloc *addr)
 
int rwsender (token822_alloc *addr)
 
void rwappend (token822_alloc *addr, saa *xl)
 
int rwhrr (token822_alloc *addr)
 
int rwhr (token822_alloc *addr)
 
int rwtocc (token822_alloc *addr)
 
void doheaderfield (stralloc *h)
 
void dobody (stralloc *h)
 
void dorecip (char *s)
 
void defaultfrommake ()
 
void dodefaultreturnpath ()
 
void mft_init ()
 
void finishmft ()
 
void finishheader ()
 
void getcontrols ()
 
int main (int argc, char **argv)
 

Variables

datetime_sec starttime
 
char * qmopts
 
int flagdeletesender = 0
 
int flagdeletefrom = 0
 
int flagdeletemessid = 0
 
int flagnamecomment = 0
 
int flaghackmess = 0
 
int flaghackrecip = 0
 
char * mailhost
 
char * mailuser
 
int mailusertokentype
 
char * mailrhost
 
char * mailruser
 
stralloc control_idhost = {0}
 
stralloc control_defaultdomain = {0}
 
stralloc control_defaulthost = {0}
 
stralloc control_plusdomain = {0}
 
stralloc sender = {0}
 
stralloc envsbuf = {0}
 
token822_alloc envs = {0}
 
int flagrh
 
int flagqueue
 
struct qmail qqt
 
saa savedh = {0}
 
saa hrlist = {0}
 
saa tocclist = {0}
 
saa hrrlist = {0}
 
saa reciplist = {0}
 
int flagresent
 
stralloc defaultdomainbuf = {0}
 
token822_alloc defaultdomain = {0}
 
stralloc defaulthostbuf = {0}
 
token822_alloc defaulthost = {0}
 
stralloc plusdomainbuf = {0}
 
token822_alloc plusdomain = {0}
 
int htypeseen [H_NUM]
 
stralloc hfbuf = {0}
 
token822_alloc hfin = {0}
 
token822_alloc hfrewrite = {0}
 
token822_alloc hfaddr = {0}
 
stralloc torecip = {0}
 
token822_alloc tr = {0}
 
stralloc defaultfrom = {0}
 
token822_alloc df = {0}
 
stralloc defaultreturnpath = {0}
 
token822_alloc drp = {0}
 
stralloc hackedruser = {0}
 
char strnum [FMT_ULONG]
 
int flagmft = 0
 
stralloc mft = {0}
 
struct constmap mapmft
 

Macro Definition Documentation

◆ LINELEN

#define LINELEN   80

Definition at line 25 of file qmail-inject.c.

◆ RECIP_AH

#define RECIP_AH   4

Definition at line 705 of file qmail-inject.c.

◆ RECIP_ARGS

#define RECIP_ARGS   2

Definition at line 703 of file qmail-inject.c.

◆ RECIP_DEFAULT

#define RECIP_DEFAULT   1

Definition at line 702 of file qmail-inject.c.

◆ RECIP_HEADER

#define RECIP_HEADER   3

Definition at line 704 of file qmail-inject.c.

Function Documentation

◆ defaultfrommake()

void defaultfrommake ( )

Definition at line 445 of file qmail-inject.c.

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

◆ die_chdir()

void die_chdir ( )

Definition at line 82 of file qmail-inject.c.

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

◆ die_invalid()

void die_invalid ( stralloc *  sa)

Definition at line 71 of file qmail-inject.c.

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

◆ die_nomem()

void die_nomem ( void  )

Definition at line 66 of file qmail-inject.c.

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

◆ die_qqt()

void die_qqt ( )

Definition at line 77 of file qmail-inject.c.

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

◆ die_read()

void die_read ( void  )

Definition at line 87 of file qmail-inject.c.

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

◆ dobody()

void dobody ( stralloc *  h)

Definition at line 417 of file qmail-inject.c.

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

◆ dodefaultreturnpath()

void dodefaultreturnpath ( )

Definition at line 507 of file qmail-inject.c.

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

◆ doheaderfield()

void doheaderfield ( stralloc *  h)

Definition at line 372 of file qmail-inject.c.

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

◆ doordie()

void doordie ( stralloc *  sa,
int  r 
)

Definition at line 93 of file qmail-inject.c.

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

◆ dorecip()

void dorecip ( char *  s)

Definition at line 425 of file qmail-inject.c.

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

◆ exitnicely()

void exitnicely ( )

Definition at line 114 of file qmail-inject.c.

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

◆ finishheader()

void finishheader ( )

Definition at line 596 of file qmail-inject.c.

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

◆ finishmft()

void finishmft ( )

Definition at line 569 of file qmail-inject.c.

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

◆ GEN_ALLOC_typedef()

GEN_ALLOC_typedef ( GEN_ALLOC_readyplus saa,
GEN_ALLOC_readyplus stralloc,
GEN_ALLOC_readyplus sa,
GEN_ALLOC_readyplus len,
GEN_ALLOC_readyplus a 
)

Definition at line 102 of file qmail-inject.c.

◆ getcontrols()

void getcontrols ( void  )

Definition at line 662 of file qmail-inject.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 707 of file qmail-inject.c.

Here is the call graph for this function:

◆ mft_init()

void mft_init ( )

Definition at line 553 of file qmail-inject.c.

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

◆ out()

void out ( char *  s,
int  len 
)

Definition at line 55 of file qmail-inject.c.

Here is the call graph for this function:

◆ outs()

void outs ( char *  s)

Definition at line 61 of file qmail-inject.c.

Here is the caller graph for this function:

◆ perm()

void perm ( )

Definition at line 63 of file qmail-inject.c.

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

◆ rwappend()

void rwappend ( token822_alloc *  addr,
saa *  xl 
)

Definition at line 334 of file qmail-inject.c.

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

◆ rwextraat()

void rwextraat ( token822_alloc *  addr)

Definition at line 196 of file qmail-inject.c.

Here is the caller graph for this function:

◆ rwextradot()

void rwextradot ( token822_alloc *  addr)

Definition at line 207 of file qmail-inject.c.

Here is the caller graph for this function:

◆ rwgeneric()

void rwgeneric ( token822_alloc *  addr)

Definition at line 289 of file qmail-inject.c.

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

◆ rwhr()

int rwhr ( token822_alloc *  addr)

Definition at line 351 of file qmail-inject.c.

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

◆ rwhrr()

int rwhrr ( token822_alloc *  addr)

Definition at line 344 of file qmail-inject.c.

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

◆ rwnoat()

void rwnoat ( token822_alloc *  addr)

Definition at line 218 of file qmail-inject.c.

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

◆ rwnodot()

void rwnodot ( token822_alloc *  addr)

Definition at line 237 of file qmail-inject.c.

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

◆ rwplus()

void rwplus ( token822_alloc *  addr)

Definition at line 266 of file qmail-inject.c.

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

◆ rwreturn()

int rwreturn ( token822_alloc *  addr)

Definition at line 321 of file qmail-inject.c.

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

◆ rwroute()

void rwroute ( token822_alloc *  addr)

Definition at line 188 of file qmail-inject.c.

Here is the caller graph for this function:

◆ rwsender()

int rwsender ( token822_alloc *  addr)

Definition at line 328 of file qmail-inject.c.

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

◆ rwtocc()

int rwtocc ( token822_alloc *  addr)

Definition at line 358 of file qmail-inject.c.

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

◆ savedh_append()

void savedh_append ( stralloc *  h)

Definition at line 165 of file qmail-inject.c.

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

◆ savedh_print()

void savedh_print ( )

Definition at line 173 of file qmail-inject.c.

Here is the caller graph for this function:

◆ setreturn()

int setreturn ( token822_alloc *  addr)

Definition at line 309 of file qmail-inject.c.

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

◆ temp()

void temp ( )

Definition at line 64 of file qmail-inject.c.

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

Variable Documentation

◆ control_defaultdomain

stralloc control_defaultdomain = {0}

Definition at line 43 of file qmail-inject.c.

◆ control_defaulthost

stralloc control_defaulthost = {0}

Definition at line 44 of file qmail-inject.c.

◆ control_idhost

stralloc control_idhost = {0}

Definition at line 42 of file qmail-inject.c.

◆ control_plusdomain

stralloc control_plusdomain = {0}

Definition at line 45 of file qmail-inject.c.

◆ defaultdomain

token822_alloc defaultdomain = {0}

Definition at line 182 of file qmail-inject.c.

◆ defaultdomainbuf

stralloc defaultdomainbuf = {0}

Definition at line 181 of file qmail-inject.c.

◆ defaultfrom

stralloc defaultfrom = {0}

Definition at line 442 of file qmail-inject.c.

◆ defaulthost

token822_alloc defaulthost = {0}

Definition at line 184 of file qmail-inject.c.

◆ defaulthostbuf

stralloc defaulthostbuf = {0}

Definition at line 183 of file qmail-inject.c.

◆ defaultreturnpath

stralloc defaultreturnpath = {0}

Definition at line 502 of file qmail-inject.c.

◆ df

token822_alloc df = {0}

Definition at line 443 of file qmail-inject.c.

◆ drp

token822_alloc drp = {0}

Definition at line 503 of file qmail-inject.c.

◆ envs

token822_alloc envs = {0}

Definition at line 49 of file qmail-inject.c.

◆ envsbuf

stralloc envsbuf = {0}

Definition at line 48 of file qmail-inject.c.

◆ flagdeletefrom

int flagdeletefrom = 0

Definition at line 31 of file qmail-inject.c.

◆ flagdeletemessid

int flagdeletemessid = 0

Definition at line 32 of file qmail-inject.c.

◆ flagdeletesender

int flagdeletesender = 0

Definition at line 30 of file qmail-inject.c.

◆ flaghackmess

int flaghackmess = 0

Definition at line 34 of file qmail-inject.c.

◆ flaghackrecip

int flaghackrecip = 0

Definition at line 35 of file qmail-inject.c.

◆ flagmft

int flagmft = 0

Definition at line 549 of file qmail-inject.c.

◆ flagnamecomment

int flagnamecomment = 0

Definition at line 33 of file qmail-inject.c.

◆ flagqueue

int flagqueue

Definition at line 52 of file qmail-inject.c.

◆ flagresent

int flagresent

Definition at line 112 of file qmail-inject.c.

◆ flagrh

int flagrh

Definition at line 50 of file qmail-inject.c.

◆ hackedruser

stralloc hackedruser = {0}

Definition at line 504 of file qmail-inject.c.

◆ hfaddr

token822_alloc hfaddr = {0}

Definition at line 370 of file qmail-inject.c.

◆ hfbuf

stralloc hfbuf = {0}

Definition at line 367 of file qmail-inject.c.

◆ hfin

token822_alloc hfin = {0}

Definition at line 368 of file qmail-inject.c.

◆ hfrewrite

token822_alloc hfrewrite = {0}

Definition at line 369 of file qmail-inject.c.

◆ hrlist

saa hrlist = {0}

Definition at line 108 of file qmail-inject.c.

◆ hrrlist

saa hrrlist = {0}

Definition at line 110 of file qmail-inject.c.

◆ htypeseen

int htypeseen[H_NUM]

Definition at line 366 of file qmail-inject.c.

◆ mailhost

char* mailhost

Definition at line 36 of file qmail-inject.c.

◆ mailrhost

char* mailrhost

Definition at line 39 of file qmail-inject.c.

◆ mailruser

char* mailruser

Definition at line 40 of file qmail-inject.c.

◆ mailuser

char* mailuser

Definition at line 37 of file qmail-inject.c.

◆ mailusertokentype

int mailusertokentype

Definition at line 38 of file qmail-inject.c.

◆ mapmft

struct constmap mapmft

Definition at line 551 of file qmail-inject.c.

◆ mft

stralloc mft = {0}

Definition at line 550 of file qmail-inject.c.

◆ plusdomain

token822_alloc plusdomain = {0}

Definition at line 186 of file qmail-inject.c.

◆ plusdomainbuf

stralloc plusdomainbuf = {0}

Definition at line 185 of file qmail-inject.c.

◆ qmopts

char* qmopts

Definition at line 29 of file qmail-inject.c.

◆ qqt

struct qmail qqt

Definition at line 53 of file qmail-inject.c.

◆ reciplist

saa reciplist = {0}

Definition at line 111 of file qmail-inject.c.

◆ savedh

saa savedh = {0}

Definition at line 107 of file qmail-inject.c.

◆ sender

stralloc sender = {0}

Definition at line 47 of file qmail-inject.c.

◆ starttime

datetime_sec starttime

Definition at line 27 of file qmail-inject.c.

◆ strnum

char strnum[FMT_ULONG]

Definition at line 505 of file qmail-inject.c.

◆ tocclist

saa tocclist = {0}

Definition at line 109 of file qmail-inject.c.

◆ torecip

stralloc torecip = {0}

Definition at line 422 of file qmail-inject.c.

◆ tr

token822_alloc tr = {0}

Definition at line 423 of file qmail-inject.c.