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_inboxrules.c File Reference
#include "../../sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <ctype.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <time.h>
#include <sys/wait.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 "../../database.h"
#include "../../msgbase.h"
#include "../../internet_addressing.h"
#include "../../ctdl_module.h"
Include dependency graph for serv_inboxrules.c:

Go to the source code of this file.

Data Structures

struct  irule
 
struct  inboxrules
 

Enumerations

enum  {
  field_from , field_tocc , field_subject , field_replyto ,
  field_sender , field_resentfrom , field_resentto , field_envfrom ,
  field_envto , field_xmailer , field_xspamflag , field_xspamstatus ,
  field_listid , field_size , field_all
}
 
enum  {
  fcomp_contains , fcomp_notcontains , fcomp_is , fcomp_isnot ,
  fcomp_matches , fcomp_notmatches
}
 
enum  {
  action_keep , action_discard , action_reject , action_fileinto ,
  action_redirect , action_vacation
}
 
enum  { scomp_larger , scomp_smaller }
 
enum  { final_continue , final_stop }
 

Functions

void free_inbox_rules (struct inboxrules *ibr)
 
struct inboxrulesdeserialize_inbox_rules (char *serialized_rules)
 
int inbox_do_fileinto (struct irule *rule, long msgnum)
 
int inbox_do_redirect (struct irule *rule, long msgnum)
 
void inbox_do_reject (struct irule *rule, struct CtdlMessage *msg)
 
void inbox_do_vacation (struct irule *rule, struct CtdlMessage *msg)
 
void inbox_do_msg (long msgnum, void *userdata)
 
void do_inbox_processing_for_user (long usernum)
 
void perform_inbox_processing (void)
 
int serv_inboxrules_roomhook (struct ctdlroom *room)
 
void cmd_gibr (char *argbuf)
 
void rewrite_rules_to_disk (const char *new_config)
 
void cmd_pibr (char *argbuf)
 
char * ctdl_module_init_sieve (void)
 

Variables

char * field_keys []
 
char * fcomp_keys []
 
char * action_keys []
 
char * scomp_keys []
 
char * final_keys []
 
long * users_requiring_inbox_processing = NULL
 
int num_urip = 0
 
int num_urip_alloc = 0
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
action_keep 
action_discard 
action_reject 
action_fileinto 
action_redirect 
action_vacation 

Definition at line 95 of file serv_inboxrules.c.

◆ anonymous enum

anonymous enum
Enumerator
scomp_larger 
scomp_smaller 

Definition at line 113 of file serv_inboxrules.c.

◆ anonymous enum

anonymous enum
Enumerator
final_continue 
final_stop 

Definition at line 123 of file serv_inboxrules.c.

◆ anonymous enum

anonymous enum
Enumerator
field_from 
field_tocc 
field_subject 
field_replyto 
field_sender 
field_resentfrom 
field_resentto 
field_envfrom 
field_envto 
field_xmailer 
field_xspamflag 
field_xspamstatus 
field_listid 
field_size 
field_all 

Definition at line 41 of file serv_inboxrules.c.

◆ anonymous enum

anonymous enum
Enumerator
fcomp_contains 
fcomp_notcontains 
fcomp_is 
fcomp_isnot 
fcomp_matches 
fcomp_notmatches 

Definition at line 77 of file serv_inboxrules.c.

Function Documentation

◆ cmd_gibr()

void cmd_gibr ( char *  argbuf)

◆ cmd_pibr()

◆ ctdl_module_init_sieve()

◆ deserialize_inbox_rules()

◆ do_inbox_processing_for_user()

◆ free_inbox_rules()

void free_inbox_rules ( struct inboxrules ibr)

Definition at line 155 of file serv_inboxrules.c.

References free(), and inboxrules::rules.

Referenced by do_inbox_processing_for_user().

◆ inbox_do_fileinto()

int inbox_do_fileinto ( struct irule rule,
long  msgnum 
)

◆ inbox_do_msg()

◆ inbox_do_redirect()

int inbox_do_redirect ( struct irule rule,
long  msgnum 
)

◆ inbox_do_reject()

void inbox_do_reject ( struct irule rule,
struct CtdlMessage msg 
)

◆ inbox_do_vacation()

void inbox_do_vacation ( struct irule rule,
struct CtdlMessage msg 
)

◆ perform_inbox_processing()

void perform_inbox_processing ( void  )

◆ rewrite_rules_to_disk()

void rewrite_rules_to_disk ( const char *  new_config)

◆ serv_inboxrules_roomhook()

int serv_inboxrules_roomhook ( struct ctdlroom room)

Variable Documentation

◆ action_keys

char* action_keys[]
Initial value:
= {
"keep",
"discard",
"reject",
"fileinto",
"redirect",
"vacation"
}

Definition at line 103 of file serv_inboxrules.c.

Referenced by deserialize_inbox_rules().

◆ fcomp_keys

char* fcomp_keys[]
Initial value:
= {
"contains",
"notcontains",
"is",
"isnot",
"matches",
"notmatches"
}

Definition at line 85 of file serv_inboxrules.c.

Referenced by deserialize_inbox_rules().

◆ field_keys

char* field_keys[]
Initial value:
= {
"from",
"tocc",
"subject",
"replyto",
"sender",
"resentfrom",
"resentto",
"envfrom",
"envto",
"xmailer",
"xspamflag",
"xspamstatus",
"listid",
"size",
"all"
}

Definition at line 58 of file serv_inboxrules.c.

Referenced by deserialize_inbox_rules(), and inbox_do_msg().

◆ final_keys

char* final_keys[]
Initial value:
= {
"continue",
"stop"
}

Definition at line 127 of file serv_inboxrules.c.

Referenced by deserialize_inbox_rules().

◆ num_urip

int num_urip = 0

Definition at line 813 of file serv_inboxrules.c.

Referenced by perform_inbox_processing(), and serv_inboxrules_roomhook().

◆ num_urip_alloc

int num_urip_alloc = 0

Definition at line 814 of file serv_inboxrules.c.

Referenced by perform_inbox_processing(), and serv_inboxrules_roomhook().

◆ scomp_keys

char* scomp_keys[]
Initial value:
= {
"larger",
"smaller"
}

Definition at line 117 of file serv_inboxrules.c.

Referenced by deserialize_inbox_rules().

◆ users_requiring_inbox_processing

long* users_requiring_inbox_processing = NULL

Definition at line 812 of file serv_inboxrules.c.

Referenced by perform_inbox_processing(), and serv_inboxrules_roomhook().