mess822x 1.23
mess822x
Loading...
Searching...
No Matches
Functions | Variables
ofmipd.c File Reference
#include <unistd.h>
#include "commands.h"
#include "sig.h"
#include "auto_qmail.h"
#include "qmail.h"
#include "readwrite.h"
#include "timeout.h"
#include "stralloc.h"
#include "buffer.h"
#include "config.h"
#include "env.h"
#include "exit.h"
#include "error.h"
#include "str.h"
#include "mess822.h"
#include "tai.h"
#include "caltime.h"
#include "cdbread.h"
#include "open.h"
#include "getln.h"
#include "byte.h"
#include "leapsecs.h"
#include "rwhconfig.h"
#include "rewritehost.h"
#include "alloc.h"
Include dependency graph for ofmipd.c:

Go to the source code of this file.

Functions

ssize_t safewrite (int fd, char *buf, int len)
 
int main (int argc, char **argv)
 

Variables

int timeout = 1200
 
char outbuf [512]
 
buffer bo = BUFFER_INIT(safewrite,1,outbuf,sizeof(outbuf))
 
config_str rewrite = CONFIG_STR
 
stralloc idappend = {0}
 
stralloc addr = {0}
 
stralloc rwaddr = {0}
 
stralloc cdbresult = {0}
 
int seenmail = 0
 
char * name
 
stralloc mailfrom = {0}
 
stralloc rcptto = {0}
 
struct qmail qqt
 
stralloc tmp = {0}
 
stralloc tmp2 = {0}
 
mess822_time datastart
 
stralloc datastamp = {0}
 
mess822_time date
 
stralloc to = {0}
 
stralloc cc = {0}
 
stralloc nrudt = {0}
 
stralloc from = {0}
 
stralloc headersender = {0}
 
stralloc replyto = {0}
 
stralloc mailreplyto = {0}
 
stralloc followupto = {0}
 
stralloc msgid = {0}
 
stralloc top = {0}
 
stralloc bottom = {0}
 
mess822_header h = MESS822_HEADER
 
mess822_action a []
 
char inbuf [1024]
 
buffer bin = BUFFER_INIT(saferead,0,inbuf,sizeof(inbuf))
 
stralloc line = {0}
 
int match
 
stralloc received = {0}
 
struct commands smtpcommands []
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 436 of file ofmipd.c.

Here is the call graph for this function:

◆ safewrite()

ssize_t safewrite ( int  fd,
char *  buf,
int  len 
)

Definition at line 29 of file ofmipd.c.

Variable Documentation

◆ a

Initial value:
= {
{ "date", 0, 0, 0, 0, &date, 0 }
, { "to", 0, 0, 0, &to, 0, 0 }
, { "cc", 0, 0, 0, &cc, 0, 0 }
, { "notice-requested-upon-delivery-to", 0, 0, 0, &nrudt, 0, 0 }
, { "from", 0, 0, 0, &from, 0, 0 }
, { "sender", 0, 0, 0, &headersender, 0, 0 }
, { "reply-to", 0, 0, 0, &replyto, 0, 0 }
, { "mail-reply-to", 0, 0, 0, &mailreplyto, 0, 0 }
, { "mail-followup-to", 0, 0, 0, &followupto, 0, 0 }
, { "message-id", 0, &msgid, 0, 0, 0, 0 }
, { "received", 0, &top, 0, 0, 0, 0 }
, { "delivered-to", 0, &top, 0, 0, 0, 0 }
, { "errors-to", 0, &top, 0, 0, 0, 0 }
, { "return-receipt-to", 0, &top, 0, 0, 0, 0 }
, { "resent-sender", 0, &top, 0, 0, 0, 0 }
, { "resent-from", 0, &top, 0, 0, 0, 0 }
, { "resent-reply-to", 0, &top, 0, 0, 0, 0 }
, { "resent-to", 0, &top, 0, 0, 0, 0 }
, { "resent-cc", 0, &top, 0, 0, 0, 0 }
, { "resent-bcc", 0, &top, 0, 0, 0, 0 }
, { "resent-date", 0, &top, 0, 0, 0, 0 }
, { "resent-message-id", 0, &top, 0, 0, 0, 0 }
, { "bcc", 0, 0, 0, 0, 0, 0 }
, { "return-path", 0, 0, 0, 0, 0, 0 }
, { "apparently-to", 0, 0, 0, 0, 0, 0 }
, { "content-length", 0, 0, 0, 0, 0, 0 }
, { 0, 0, &bottom, 0, 0, 0, 0 }
}
stralloc headersender
Definition: ofmipd.c:208
stralloc bottom
Definition: ofmipd.c:215
stralloc nrudt
Definition: ofmipd.c:206
stralloc msgid
Definition: ofmipd.c:213
stralloc replyto
Definition: ofmipd.c:209
stralloc followupto
Definition: ofmipd.c:211
mess822_time date
Definition: ofmipd.c:203
stralloc from
Definition: ofmipd.c:207
stralloc cc
Definition: ofmipd.c:205
stralloc top
Definition: ofmipd.c:214
stralloc to
Definition: ofmipd.c:204
stralloc mailreplyto
Definition: ofmipd.c:210

Definition at line 218 of file ofmipd.c.

◆ addr

stralloc addr = {0}

Definition at line 60 of file ofmipd.c.

◆ bin

buffer bin = BUFFER_INIT(saferead,0,inbuf,sizeof(inbuf))

Definition at line 319 of file ofmipd.c.

◆ bo

buffer bo = BUFFER_INIT(safewrite,1,outbuf,sizeof(outbuf))

Definition at line 38 of file ofmipd.c.

◆ bottom

stralloc bottom = {0}

Definition at line 215 of file ofmipd.c.

◆ cc

stralloc cc = {0}

Definition at line 205 of file ofmipd.c.

◆ cdbresult

stralloc cdbresult = {0}

Definition at line 109 of file ofmipd.c.

◆ datastamp

stralloc datastamp = {0}

Definition at line 201 of file ofmipd.c.

◆ datastart

mess822_time datastart

Definition at line 200 of file ofmipd.c.

◆ date

Definition at line 203 of file ofmipd.c.

◆ followupto

stralloc followupto = {0}

Definition at line 211 of file ofmipd.c.

◆ from

stralloc from = {0}

Definition at line 207 of file ofmipd.c.

◆ h

Definition at line 217 of file ofmipd.c.

◆ headersender

stralloc headersender = {0}

Definition at line 208 of file ofmipd.c.

◆ idappend

stralloc idappend = {0}

Definition at line 58 of file ofmipd.c.

◆ inbuf

char inbuf[1024]

Definition at line 318 of file ofmipd.c.

◆ line

stralloc line = {0}

Definition at line 321 of file ofmipd.c.

◆ mailfrom

stralloc mailfrom = {0}

Definition at line 115 of file ofmipd.c.

◆ mailreplyto

stralloc mailreplyto = {0}

Definition at line 210 of file ofmipd.c.

◆ match

int match

Definition at line 322 of file ofmipd.c.

◆ msgid

stralloc msgid = {0}

Definition at line 213 of file ofmipd.c.

◆ name

char* name

Definition at line 113 of file ofmipd.c.

◆ nrudt

stralloc nrudt = {0}

Definition at line 206 of file ofmipd.c.

◆ outbuf

char outbuf[512]

Definition at line 37 of file ofmipd.c.

◆ qqt

struct qmail qqt

Definition at line 179 of file ofmipd.c.

◆ rcptto

stralloc rcptto = {0}

Definition at line 116 of file ofmipd.c.

◆ received

stralloc received = {0}

Definition at line 360 of file ofmipd.c.

◆ replyto

stralloc replyto = {0}

Definition at line 209 of file ofmipd.c.

◆ rewrite

Definition at line 57 of file ofmipd.c.

◆ rwaddr

stralloc rwaddr = {0}

Definition at line 61 of file ofmipd.c.

◆ seenmail

int seenmail = 0

Definition at line 112 of file ofmipd.c.

◆ smtpcommands

struct commands smtpcommands[]
Initial value:
= {
{ "rcpt", smtp_rcpt, 0 }
, { "mail", smtp_mail, 0 }
, { "data", smtp_data, flush }
, { "quit", smtp_quit, flush }
, { "helo", smtp_helo, flush }
, { "ehlo", smtp_ehlo, flush }
, { "rset", smtp_rset, 0 }
, { "help", smtp_help, flush }
, { "noop", smtp_noop, flush }
, { "vrfy", smtp_vrfy, flush }
, { 0, smtp_unimpl, flush }
}

Definition at line 422 of file ofmipd.c.

◆ timeout

int timeout = 1200

Definition at line 27 of file ofmipd.c.

◆ tmp

stralloc tmp = {0}

Definition at line 183 of file ofmipd.c.

◆ tmp2

stralloc tmp2 = {0}

Definition at line 184 of file ofmipd.c.

◆ to

stralloc to = {0}

Definition at line 204 of file ofmipd.c.

◆ top

stralloc top = {0}

Definition at line 214 of file ofmipd.c.