Qsmtp  0.30dev
Macros | Functions | Variables
queue.c File Reference

functions for communication with qmail-queue More...

#include <qsmtpd/queue.h>
#include <fmt.h>
#include <log.h>
#include <netio.h>
#include <qsmtpd/antispam.h>
#include <qsmtpd/qsmtpd.h>
#include <sstring.h>
#include <tls.h>
#include <errno.h>
#include <syslog.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

Macros

#define WRITE(buf, len)
 

Functions

static int err_pipe (void)
 
static int err_fork (void)
 
void queue_reset (void)
 reset queue descriptors
 
int queue_init (void)
 
int queue_envelope (const unsigned long msgsize, const int chunked)
 write the envelope data to qmail-queue and syslog More...
 
int queue_result (void)
 

Variables

static const char noqueue [] = "451 4.3.2 can not connect to queue\r\n"
 
static pid_t qpid
 
int queuefd_data = -1
 
int queuefd_hdr = -1
 

Detailed Description

functions for communication with qmail-queue

Macro Definition Documentation

#define WRITE (   buf,
  len 
)
Value:
do { \
if ( (rc = write(queuefd_hdr, buf, len)) < 0 ) { \
goto err_write; \
} \
} while (0)
int queuefd_hdr
Definition: queue.c:24

Function Documentation

int queue_envelope ( const unsigned long  msgsize,
const int  chunked 
)

write the envelope data to qmail-queue and syslog

Parameters
msgsizesize of the received message in bytes
chunkedif message was transferred using BDAT

Variable Documentation

int queuefd_data = -1

descriptor to send message data to qmail-queue

int queuefd_hdr = -1

descriptor to send header data to qmail-queue