citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
serv_smtp.c File Reference
#include "../../sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <syslog.h>
#include <time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <assert.h>
#include <libcitadel.h>
#include "../../citadel.h"
#include "../../server.h"
#include "../../citserver.h"
#include "../../support.h"
#include "../../config.h"
#include "../../control.h"
#include "../../user_ops.h"
#include "../../room_ops.h"
#include "../../database.h"
#include "../../msgbase.h"
#include "../../internet_addressing.h"
#include "../../genstamp.h"
#include "../../domain.h"
#include "../../clientsocket.h"
#include "../../locate_host.h"
#include "../../citadel_dirs.h"
#include "../../ctdl_module.h"
#include "smtp_util.h"
Include dependency graph for serv_smtp.c:

Go to the source code of this file.

Enumerations

enum  { smtp_command , smtp_user , smtp_password , smtp_plain }
 
enum  SMTP_FLAGS { HELO , EHLO , LHLO }
 

Functions

void smtp_greeting (int is_msa)
 
void smtps_greeting (void)
 
void smtp_msa_greeting (void)
 
void lmtp_greeting (void)
 
void smtp_mta_greeting (void)
 
void lmtp_unfiltered_greeting (void)
 
void smtp_auth_greeting (void)
 
void smtp_hello (int which_command)
 
void smtp_webcit_preferences_hack_backend (long msgnum, void *userdata)
 
void smtp_webcit_preferences_hack (void)
 
void smtp_help (void)
 
void smtp_get_user (int offset)
 
void smtp_get_pass (void)
 
void smtp_try_plain (void)
 
void smtp_auth (void)
 
void smtp_rset (int do_response)
 
void smtp_data_clear (void)
 
void smtp_mail (void)
 
void smtp_rcpt (void)
 
void smtp_data (void)
 
void smtp_starttls (void)
 
void smtp_noop (void)
 
void smtp_quit (void)
 
void smtp_command_loop (void)
 
void smtp_cleanup_function (void)
 
char * ctdl_module_init_smtp (void)
 

Variables

const char * CitadelServiceSMTP_MTA ="SMTP-MTA"
 
const char * CitadelServiceSMTPS_MTA ="SMTPs-MTA"
 
const char * CitadelServiceSMTP_MSA ="SMTP-MSA"
 
const char * CitadelServiceSMTP_LMTP ="LMTP"
 
const char * CitadelServiceSMTP_LMTP_UNF ="LMTP-UnF"
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
smtp_command 
smtp_user 
smtp_password 
smtp_plain 

Definition at line 73 of file serv_smtp.c.

◆ SMTP_FLAGS

enum SMTP_FLAGS
Enumerator
HELO 
EHLO 
LHLO 

Definition at line 80 of file serv_smtp.c.

Function Documentation

◆ ctdl_module_init_smtp()

◆ lmtp_greeting()

void lmtp_greeting ( void  )

Definition at line 151 of file serv_smtp.c.

References SMTP, and smtp_greeting().

Referenced by ctdl_module_init_smtp().

◆ lmtp_unfiltered_greeting()

void lmtp_unfiltered_greeting ( void  )

Definition at line 165 of file serv_smtp.c.

References SMTP, and smtp_greeting().

Referenced by ctdl_module_init_smtp().

◆ smtp_auth()

void smtp_auth ( void  )

Definition at line 402 of file serv_smtp.c.

References CC, cprintf(), SMTP, smtp_get_user(), smtp_plain, smtp_try_plain(), and smtp_user.

Referenced by smtp_command_loop().

◆ smtp_auth_greeting()

void smtp_auth_greeting ( void  )

Definition at line 173 of file serv_smtp.c.

References CC, and cprintf().

Referenced by smtp_get_pass(), and smtp_try_plain().

◆ smtp_cleanup_function()

void smtp_cleanup_function ( void  )

Definition at line 984 of file serv_smtp.c.

References CC, free(), SMTP, and smtp_command_loop().

Referenced by ctdl_module_init_smtp().

◆ smtp_command_loop()

◆ smtp_data()

◆ smtp_data_clear()

void smtp_data_clear ( void  )

Definition at line 482 of file serv_smtp.c.

References SMTP.

Referenced by smtp_data().

◆ smtp_get_pass()

void smtp_get_pass ( void  )

Definition at line 327 of file serv_smtp.c.

References cprintf(), CtdlTryPassword(), pass_ok, SIZ, SMTP, smtp_auth_greeting(), and smtp_command.

Referenced by smtp_command_loop().

◆ smtp_get_user()

void smtp_get_user ( int  offset)

Definition at line 303 of file serv_smtp.c.

References cprintf(), CtdlLoginExistingUser(), login_ok, SIZ, SMTP, smtp_command, and smtp_password.

Referenced by smtp_auth(), and smtp_command_loop().

◆ smtp_greeting()

◆ smtp_hello()

void smtp_hello ( int  which_command)

Definition at line 183 of file serv_smtp.c.

References CC, cprintf(), CtdlGetConfigLong(), EHLO, HELO, LHLO, and SMTP.

Referenced by smtp_command_loop().

◆ smtp_help()

void smtp_help ( void  )

Definition at line 298 of file serv_smtp.c.

References cprintf().

Referenced by smtp_command_loop().

◆ smtp_mail()

void smtp_mail ( void  )

◆ smtp_msa_greeting()

void smtp_msa_greeting ( void  )

Definition at line 145 of file serv_smtp.c.

References smtp_greeting().

Referenced by ctdl_module_init_smtp().

◆ smtp_mta_greeting()

void smtp_mta_greeting ( void  )

Definition at line 159 of file serv_smtp.c.

References smtp_greeting().

Referenced by ctdl_module_init_smtp().

◆ smtp_noop()

void smtp_noop ( void  )

Definition at line 866 of file serv_smtp.c.

References cprintf().

Referenced by smtp_command_loop().

◆ smtp_quit()

void smtp_quit ( void  )

Definition at line 872 of file serv_smtp.c.

References CC, cprintf(), and KILLME_CLIENT_LOGGED_OUT.

Referenced by smtp_command_loop().

◆ smtp_rcpt()

◆ smtp_rset()

void smtp_rset ( int  do_response)

Definition at line 460 of file serv_smtp.c.

References cprintf(), and SMTP.

Referenced by smtp_command_loop(), and smtp_starttls().

◆ smtp_starttls()

void smtp_starttls ( void  )

Definition at line 852 of file serv_smtp.c.

References CtdlModuleStartCryptoMsgs(), SIZ, and smtp_rset().

Referenced by smtp_command_loop().

◆ smtp_try_plain()

void smtp_try_plain ( void  )

◆ smtp_webcit_preferences_hack()

void smtp_webcit_preferences_hack ( void  )

◆ smtp_webcit_preferences_hack_backend()

void smtp_webcit_preferences_hack_backend ( long  msgnum,
void *  userdata 
)

◆ smtps_greeting()

void smtps_greeting ( void  )

Definition at line 135 of file serv_smtp.c.

References CC, CtdlModuleStartCryptoMsgs(), KILLME_NO_CRYPTO, and smtp_greeting().

Referenced by ctdl_module_init_smtp().

Variable Documentation

◆ CitadelServiceSMTP_LMTP

const char* CitadelServiceSMTP_LMTP ="LMTP"

Definition at line 1004 of file serv_smtp.c.

Referenced by ctdl_module_init_smtp().

◆ CitadelServiceSMTP_LMTP_UNF

const char* CitadelServiceSMTP_LMTP_UNF ="LMTP-UnF"

Definition at line 1005 of file serv_smtp.c.

Referenced by ctdl_module_init_smtp().

◆ CitadelServiceSMTP_MSA

const char* CitadelServiceSMTP_MSA ="SMTP-MSA"

Definition at line 1003 of file serv_smtp.c.

Referenced by ctdl_module_init_smtp().

◆ CitadelServiceSMTP_MTA

const char* CitadelServiceSMTP_MTA ="SMTP-MTA"

Definition at line 1001 of file serv_smtp.c.

Referenced by ctdl_module_init_smtp().

◆ CitadelServiceSMTPS_MTA

const char* CitadelServiceSMTPS_MTA ="SMTPs-MTA"

Definition at line 1002 of file serv_smtp.c.

Referenced by ctdl_module_init_smtp().