s/qmail 4.2.29a
Next generation secure email transport
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
qmail-pop3d.c File Reference
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "commands.h"
#include "sig.h"
#include "getln.h"
#include "stralloc.h"
#include "buffer.h"
#include "alloc.h"
#include "open.h"
#include "prioq.h"
#include "scan.h"
#include "fmt.h"
#include "str.h"
#include "exit.h"
#include "maildir.h"
#include "timeout.h"
Include dependency graph for qmail-pop3d.c:

Go to the source code of this file.

Data Structures

struct  message
 

Macros

#define FDIN   0
 
#define FDOUT   1
 

Functions

int rename (const char *, const char *)
 
void die ()
 
ssize_t saferead (int fd, char *buf, int len)
 
ssize_t safewrite (int fd, char *buf, int len)
 
void out (char *buf, int len)
 
void outs (char *s)
 
void flush ()
 
void err (char *s)
 
void die_nomem ()
 
void die_nomaildir ()
 
void die_scan ()
 
void err_syntax ()
 
void err_unimpl ()
 
void err_deleted ()
 
void err_nozero ()
 
void err_toobig ()
 
void err_nosuch ()
 
void err_nounlink ()
 
void okay ()
 
void printfn (char *fn)
 
void blast (buffer *bf, unsigned long limit)
 
void getlist ()
 
void pop3_stat ()
 
void pop3_rset ()
 
void pop3_last ()
 
void pop3_quit ()
 
int msgno (char *arg)
 
void pop3_dele (char *arg)
 
void list (int i, int flaguidl)
 
void dolisting (char *arg, int flaguidl)
 
void pop3_uidl (char *arg)
 
void pop3_list (char *arg)
 
void pop3_top (char *arg)
 
int main (int argc, char **argv)
 

Variables

char outbuf [1024]
 
buffer bo = BUFFER_INIT(safewrite,FDOUT,outbuf,sizeof(outbuf))
 
char inbuf [128]
 
buffer bi = BUFFER_INIT(saferead,FDIN,inbuf,sizeof(inbuf))
 
char strnum [FMT_ULONG]
 
stralloc line = {0}
 
stralloc filenames = {0}
 
prioq pq = {0}
 
struct messagem
 
int numm
 
int last = 0
 
char msgbuf [1024]
 
buffer bm
 
struct commands pop3commands []
 

Macro Definition Documentation

◆ FDIN

#define FDIN   0

Definition at line 19 of file qmail-pop3d.c.

◆ FDOUT

#define FDOUT   1

Definition at line 20 of file qmail-pop3d.c.

Function Documentation

◆ blast()

void blast ( buffer *  bf,
unsigned long  limit 
)

Definition at line 91 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ die()

void die ( )

Definition at line 24 of file qmail-pop3d.c.

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

◆ die_nomaildir()

void die_nomaildir ( )

Definition at line 69 of file qmail-pop3d.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 68 of file qmail-pop3d.c.

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

◆ die_scan()

void die_scan ( )

Definition at line 70 of file qmail-pop3d.c.

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

◆ dolisting()

void dolisting ( char *  arg,
int  flaguidl 
)

Definition at line 239 of file qmail-pop3d.c.

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

◆ err()

void err ( char *  s)

Definition at line 60 of file qmail-pop3d.c.

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

◆ err_deleted()

void err_deleted ( )

Definition at line 74 of file qmail-pop3d.c.

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

◆ err_nosuch()

void err_nosuch ( )

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

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

◆ err_nounlink()

void err_nounlink ( )

Definition at line 78 of file qmail-pop3d.c.

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

◆ err_nozero()

void err_nozero ( )

Definition at line 75 of file qmail-pop3d.c.

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

◆ err_syntax()

void err_syntax ( void  )

Definition at line 72 of file qmail-pop3d.c.

Here is the caller graph for this function:

◆ err_toobig()

void err_toobig ( )

Definition at line 76 of file qmail-pop3d.c.

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

◆ err_unimpl()

void err_unimpl ( void  )

Definition at line 73 of file qmail-pop3d.c.

◆ flush()

void flush ( )

Definition at line 56 of file qmail-pop3d.c.

Here is the caller graph for this function:

◆ getlist()

void getlist ( )

Definition at line 127 of file qmail-pop3d.c.

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

◆ list()

void list ( int  i,
int  flaguidl 
)

Definition at line 230 of file qmail-pop3d.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 300 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ msgno()

int msgno ( char *  arg)

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

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

◆ okay()

void okay ( )

Definition at line 80 of file qmail-pop3d.c.

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

◆ out()

void out ( char *  buf,
int  len 
)

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

◆ outs()

void outs ( char *  s)

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

Here is the caller graph for this function:

◆ pop3_dele()

void pop3_dele ( char *  arg)

Definition at line 219 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_last()

void pop3_last ( )

Definition at line 179 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_list()

void pop3_list ( char *  arg)

Definition at line 259 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_quit()

void pop3_quit ( )

Definition at line 187 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_rset()

void pop3_rset ( )

Definition at line 169 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_stat()

void pop3_stat ( )

Definition at line 152 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_top()

void pop3_top ( char *  arg)

Definition at line 264 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ pop3_uidl()

void pop3_uidl ( char *  arg)

Definition at line 258 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ printfn()

void printfn ( char *  fn)

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

Here is the caller graph for this function:

◆ rename()

int rename ( const char *  ,
const char *   
)
Here is the caller graph for this function:

◆ saferead()

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

Definition at line 26 of file qmail-pop3d.c.

Here is the call graph for this function:

◆ safewrite()

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

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

Here is the call graph for this function:

Variable Documentation

◆ bi

buffer bi = BUFFER_INIT(saferead,FDIN,inbuf,sizeof(inbuf))

Definition at line 46 of file qmail-pop3d.c.

◆ bm

buffer bm

Definition at line 262 of file qmail-pop3d.c.

◆ bo

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

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

◆ filenames

stralloc filenames = {0}

Definition at line 115 of file qmail-pop3d.c.

◆ inbuf

char inbuf[128]

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

◆ last

int last = 0

Definition at line 125 of file qmail-pop3d.c.

◆ line

stralloc line = {0}

Definition at line 89 of file qmail-pop3d.c.

◆ m

struct message * m

◆ msgbuf

char msgbuf[1024]

Definition at line 261 of file qmail-pop3d.c.

◆ numm

int numm

Definition at line 124 of file qmail-pop3d.c.

◆ outbuf

char outbuf[1024]

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

◆ pop3commands

struct commands pop3commands[]
Initial value:
= {
{ "quit", pop3_quit, 0 }
, { "stat", pop3_stat, 0 }
, { "list", pop3_list, 0 }
, { "uidl", pop3_uidl, 0 }
, { "dele", pop3_dele, 0 }
, { "retr", pop3_top, 0 }
, { "rset", pop3_rset, 0 }
, { "last", pop3_last, 0 }
, { "top", pop3_top, 0 }
, { "noop", okay, 0 }
, { 0, err_unimpl, 0 }
}
void pop3_quit()
Definition: qmail-pop3d.c:187
void pop3_last()
Definition: qmail-pop3d.c:179
void pop3_top(char *arg)
Definition: qmail-pop3d.c:264
void okay()
Definition: qmail-pop3d.c:80
void pop3_list(char *arg)
Definition: qmail-pop3d.c:259
void pop3_rset()
Definition: qmail-pop3d.c:169
void pop3_dele(char *arg)
Definition: qmail-pop3d.c:219
void err_unimpl()
Definition: qmail-pop3d.c:73
void pop3_stat()
Definition: qmail-pop3d.c:152
void pop3_uidl(char *arg)
Definition: qmail-pop3d.c:258

Definition at line 286 of file qmail-pop3d.c.

◆ pq

prioq pq = {0}

Definition at line 116 of file qmail-pop3d.c.

◆ strnum

char strnum[FMT_ULONG]

Definition at line 88 of file qmail-pop3d.c.