Qsmtp  0.23svn
Data Structures | Defines | Functions | Variables
include/qsmtpd.h File Reference

definitions for common parts from Qsmtpd exported from qsmtpd.c More...

#include <netinet/in.h>
#include <sys/queue.h>
#include <sys/types.h>
#include "sstring.h"
#include "qdns.h"

Go to the source code of this file.

Data Structures

struct  smtpcomm
struct  xmitstat
struct  recip
 list of recipients given for this transaction More...

Defines

#define EBOGUS   1002
#define EDONE   1003
#define HELOSTR   (xmitstat.helostr.len ? xmitstat.helostr.s : xmitstat.remotehost.s)
#define HELOLEN   (xmitstat.helostr.len ? xmitstat.helostr.len : xmitstat.remotehost.len)
#define MAILFROM   (xmitstat.mailfrom.len ? xmitstat.mailfrom.s : "")

Functions

int err_control (const char *)
 write and log error message if opening config file leads to an error
void freedata (void)
 free all ressources allocated for mail transaction
pid_t fork_clean ()
 fork() but clean up internal structures
void conn_cleanup (const int rc)
 clean up the allocated data and exit the process
int smtp_quit (void)
 TAILQ_HEAD (tailhead, recip) head

Variables

struct smtpcomm commands []
struct xmitstat xmitstat
char * protocol
const char * auth_host
const char * auth_check
const char ** auth_sub
string heloname
string msgidhost
string liphost
unsigned int goodrcpt
int badbounce
unsigned long sslauth
unsigned long databytes
int relayclient
long comstate
int authhide
int submission_mode
struct recipthisrecip

Detailed Description

definitions for common parts from Qsmtpd exported from qsmtpd.c


Function Documentation

void conn_cleanup ( const int  rc)

clean up the allocated data and exit the process

Parameters:
rcdesired return code of the process
int err_control ( const char *  fn)

write and log error message if opening config file leads to an error

Parameters:
fnname of the file that caused the error
See also:
err_control2
pid_t fork_clean ( )

fork() but clean up internal structures

This will work exactly like fork(). If it returns 0 (i.e. you are the child) it will also clean the memory mappings etc. of the Qsmtpd process that the child doesn't need.


Variable Documentation

const char* auth_check

checkpassword or one of his friends for auth

const char* auth_host

hostname for auth

const char** auth_sub

subprogram and arguments to be invoked by auth_check (usually /bin/true)

subprogram to be invoked by auth_check (usually /bin/true)

int authhide

hide source of authenticated mail

int badbounce

bounce message with more than one recipient

struct smtpcomm commands[]

all supported SMTP commands

long comstate

status of the command state machine

status of the command state machine, initialized to noop

unsigned long databytes

maximum message size

unsigned int goodrcpt

number of valid recipients

the fqdn to show in helo

replacement domain if to address is <foo@[ip]>

replacement domain if TO address is <foo@[ip]>

the fqdn to use if a message-id is added

char* protocol

the protocol string to use (e.g. "ESMTP")

flag if this client is allowed to relay by IP: 0 unchecked, 1 allowed, 2 denied

unsigned long sslauth

if SMTP AUTH is only allowed after STARTTLS

if we should act as message submission agent

This contains some flags describing the transmission and it's status.