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)  

serv_imap.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
#include "user_ops.h"
#include "database.h"
#include "msgbase.h"
#include "internet_addressing.h"
#include "serv_imap.h"
#include "imap_tools.h"
#include "imap_list.h"
#include "imap_fetch.h"
#include "imap_search.h"
#include "imap_store.h"
#include "imap_acl.h"
#include "imap_metadata.h"
#include "imap_misc.h"
#include "ctdl_module.h"
Include dependency graph for serv_imap.c:

Go to the source code of this file.

Data Structures

struct  irl
 
struct  __irlparms
 

Typedefs

typedef struct __irlparms irlparms
 

Functions

void registerImapCMD (const char *First, long FLen, const char *Second, long SLen, imap_handler H, int Flags)
 
const imap_handler_hookimap_lookup (int num_parms, ConstStr *Params)
 
void imap_free_msgids (void)
 
void imap_free_transmitted_message (void)
 
void imap_set_seen_flags (int first_msg)
 
void imap_add_single_msgid (long msgnum, void *userdata)
 
void imap_load_msgids (void)
 
void imap_rescan_msgids (void)
 
void imap_cleanup_function (void)
 
void imap_output_capability_string (void)
 
void imap_capability (int num_parms, ConstStr *Params)
 
void imap_id (int num_parms, ConstStr *Params)
 
void imap_greeting (void)
 
void imaps_greeting (void)
 
void imap_login (int num_parms, ConstStr *Params)
 
void imap_authenticate (int num_parms, ConstStr *Params)
 
void imap_auth_plain (void)
 
void imap_auth_login_user (long state)
 
void imap_auth_login_pass (long state)
 
void imap_starttls (int num_parms, ConstStr *Params)
 
void imap_select (int num_parms, ConstStr *Params)
 
int imap_do_expunge (void)
 
void imap_expunge (int num_parms, ConstStr *Params)
 
void imap_close (int num_parms, ConstStr *Params)
 
void imap_namespace (int num_parms, ConstStr *Params)
 
void imap_create (int num_parms, ConstStr *Params)
 
int imap_grabroom (char *returned_roomname, const char *foldername, int zapped_ok)
 
void imap_status (int num_parms, ConstStr *Params)
 
void imap_subscribe (int num_parms, ConstStr *Params)
 
void imap_unsubscribe (int num_parms, ConstStr *Params)
 
void imap_delete (int num_parms, ConstStr *Params)
 
void imap_rename_backend (struct ctdlroom *qrbuf, void *data)
 
void imap_rename (int num_parms, ConstStr *Params)
 
void imap_command_loop (void)
 
void imap_noop (int num_parms, ConstStr *Params)
 
void imap_logout (int num_parms, ConstStr *Params)
 
char * ctdl_module_imap_init (int threading)
 

Variables

HashList * ImapCmds = NULL
 
const char * CitadelServiceIMAP ="IMAP"
 
const char * CitadelServiceIMAPS ="IMAPS"
 

Typedef Documentation

◆ irlparms

typedef struct __irlparms irlparms

Function Documentation

◆ ctdl_module_imap_init()

◆ imap_add_single_msgid()

void imap_add_single_msgid ( long  msgnum,
void *  userdata 
)

◆ imap_auth_login_pass()

◆ imap_auth_login_user()

◆ imap_auth_plain()

◆ imap_authenticate()

void imap_authenticate ( int  num_parms,
ConstStr *  Params 
)

◆ imap_capability()

void imap_capability ( int  num_parms,
ConstStr *  Params 
)

Definition at line 528 of file serv_imap.c.

References IAPuts, imap_output_capability_string(), and IReply.

Referenced by ctdl_module_imap_init().

◆ imap_cleanup_function()

◆ imap_close()

void imap_close ( int  num_parms,
ConstStr *  Params 
)

Definition at line 974 of file serv_imap.c.

References IMAP, imap_do_expunge(), imap_free_msgids(), and IReply.

Referenced by ctdl_module_imap_init().

◆ imap_command_loop()

◆ imap_create()

void imap_create ( int  num_parms,
ConstStr *  Params 
)

◆ imap_delete()

void imap_delete ( int  num_parms,
ConstStr *  Params 
)

◆ imap_do_expunge()

◆ imap_expunge()

void imap_expunge ( int  num_parms,
ConstStr *  Params 
)

Definition at line 962 of file serv_imap.c.

References imap_do_expunge(), and IReplyPrintf().

Referenced by ctdl_module_imap_init().

◆ imap_free_msgids()

void imap_free_msgids ( void  )

◆ imap_free_transmitted_message()

void imap_free_transmitted_message ( void  )

Definition at line 166 of file serv_imap.c.

References IMAP.

Referenced by imap_append(), imap_cleanup_function(), and imap_command_loop().

◆ imap_grabroom()

int imap_grabroom ( char *  returned_roomname,
const char *  foldername,
int  zapped_ok 
)

◆ imap_greeting()

◆ imap_id()

void imap_id ( int  num_parms,
ConstStr *  Params 
)

Definition at line 546 of file serv_imap.c.

References IAPuts, and IReply.

Referenced by ctdl_module_imap_init().

◆ imap_load_msgids()

◆ imap_login()

void imap_login ( int  num_parms,
ConstStr *  Params 
)

◆ imap_logout()

void imap_logout ( int  num_parms,
ConstStr *  Params 
)

◆ imap_lookup()

const imap_handler_hook * imap_lookup ( int  num_parms,
ConstStr *  Params 
)

Definition at line 83 of file serv_imap.c.

References CC, CCCIMAP, ImapCmds, and __citimap::Reply.

Referenced by imap_command_loop().

◆ imap_namespace()

void imap_namespace ( int  num_parms,
ConstStr *  Params 
)

◆ imap_noop()

void imap_noop ( int  num_parms,
ConstStr *  Params 
)

Definition at line 1645 of file serv_imap.c.

References IReply.

Referenced by ctdl_module_imap_init().

◆ imap_output_capability_string()

void imap_output_capability_string ( void  )

Definition at line 495 of file serv_imap.c.

References CC, and IAPuts.

Referenced by imap_capability(), imap_greeting(), and imap_login().

◆ imap_rename()

◆ imap_rename_backend()

◆ imap_rescan_msgids()

◆ imap_select()

◆ imap_set_seen_flags()

◆ imap_starttls()

void imap_starttls ( int  num_parms,
ConstStr *  Params 
)

Definition at line 810 of file serv_imap.c.

References CtdlModuleStartCryptoMsgs(), and SIZ.

Referenced by ctdl_module_imap_init().

◆ imap_status()

void imap_status ( int  num_parms,
ConstStr *  Params 
)

◆ imap_subscribe()

void imap_subscribe ( int  num_parms,
ConstStr *  Params 
)

Definition at line 1223 of file serv_imap.c.

References CC, CtdlUserGoto(), IMAP, imap_grabroom(), IReply, IReplyPrintf(), and ROOMNAMELEN.

Referenced by ctdl_module_imap_init().

◆ imap_unsubscribe()

void imap_unsubscribe ( int  num_parms,
ConstStr *  Params 
)

Definition at line 1265 of file serv_imap.c.

References CC, CtdlForgetThisRoom(), CtdlUserGoto(), IMAP, imap_grabroom(), IReply, and ROOMNAMELEN.

Referenced by ctdl_module_imap_init().

◆ imaps_greeting()

void imaps_greeting ( void  )

Definition at line 588 of file serv_imap.c.

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

Referenced by ctdl_module_imap_init().

◆ registerImapCMD()

void registerImapCMD ( const char *  First,
long  FLen,
const char *  Second,
long  SLen,
imap_handler  H,
int  Flags 
)

Definition at line 58 of file serv_imap.c.

References _imap_handler_hook::Flags, _imap_handler_hook::h, ImapCmds, malloc(), and SIZ.

Variable Documentation

◆ CitadelServiceIMAP

const char* CitadelServiceIMAP ="IMAP"

Definition at line 1661 of file serv_imap.c.

Referenced by ctdl_module_imap_init().

◆ CitadelServiceIMAPS

const char* CitadelServiceIMAPS ="IMAPS"

Definition at line 1662 of file serv_imap.c.

Referenced by ctdl_module_imap_init().

◆ ImapCmds

HashList* ImapCmds = NULL

Definition at line 57 of file serv_imap.c.

Referenced by ctdl_module_imap_init(), imap_lookup(), and registerImapCMD().