definitions for common parts from Qsmtpd exported from qsmtpd.c  
More...
#include <qdns.h>
#include <sstring.h>
#include <netinet/in.h>
#include <sys/queue.h>
#include <sys/types.h>
 
Go to the source code of this file.
 | 
| 
#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 : "") | 
|   | 
 | 
| int  | err_control (const char *) | 
|   | write and log error message if opening config file leads to an error  More...
  | 
|   | 
| int  | err_control2 (const char *, const char *) | 
|   | write and log error message if opening config file leads to an error  More...
  | 
|   | 
| 
void  | freedata (void) | 
|   | free all ressources allocated for mail transaction 
  | 
|   | 
| pid_t  | fork_clean () | 
|   | fork() but clean up internal structures  More...
  | 
|   | 
| int  | pipe_move (int p[2], int target) | 
|   | move the read end of the pipe to the target descriptor  More...
  | 
|   | 
| void  | conn_cleanup (const int rc) | 
|   | clean up the allocated data and exit the process  More...
  | 
|   | 
| 
  | TAILQ_HEAD (, recip) head | 
|   | 
| 
static int  | connection_is_ipv4 (void) | 
|   | 
| 
static int  | is_authenticated_client (void) | 
|   | 
definitions for common parts from Qsmtpd exported from qsmtpd.c 
 
      
        
          | void conn_cleanup  | 
          ( | 
          const int  | 
          rc | ) | 
           | 
        
      
 
clean up the allocated data and exit the process 
- Parameters
 - 
  
    | rc | desired 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
 - 
  
    | fn | name of the file that caused the error  | 
  
   
- See also
 - err_control2 
 
 
 
      
        
          | int err_control2  | 
          ( | 
          const char *  | 
          msg,  | 
        
        
           | 
           | 
          const char *  | 
          fn  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
write and log error message if opening config file leads to an error 
- Parameters
 - 
  
    | msg | additional message to log  | 
    | fn | name of the file that caused the error  | 
  
   
- See also
 - err_control 
 
 
 
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. 
 
 
      
        
          | int pipe_move  | 
          ( | 
          int  | 
          p[2],  | 
        
        
           | 
           | 
          int  | 
          target  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
move the read end of the pipe to the target descriptor 
- Parameters
 - 
  
    | p | both ends of the pipe  | 
    | target | the target descriptor of the read end  | 
  
   
- Returns
 - if everything went smooth 
 
- Return values
 - 
  
  
 
This will move the read end of the pipe to target, closing both the write end of the pipe and the old read end of the pipe. This is intended to be called in the child process directly after forking, but before execve(). 
 
 
hide source of authenticated mail 
 
 
bounce message with more than one recipient 
 
 
status of the command state machine
status of the command state machine, initialized to noop 
 
 
the SMTP command currently processed 
 
 
number of valid recipients 
 
 
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 
 
 
flag if this client is allowed to relay by IP: 0 unchecked, 1 allowed, 2 denied 
 
 
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.