Grammar change in the license declaration.
[citadel.git] / citadel / server / config.h
1 // Copyright (c) 1987-2024 by the citadel.org team
2 //
3 // This program is open source software.  Use, duplication, or disclosure
4 // is subject to the terms of the GNU General Public License version 3.
5
6 #include "serv_extensions.h"
7 #include "citadel_dirs.h"
8
9 // This is the format of the legacy config file.  Do not attempt to do anything with it other
10 // than migrate it into the new format.  Seriously -- DO NOT CHANGE IT.  The only purpose of this
11 // struct is to represent the OLD configuration format.
12 struct legacy_config {
13         char c_nodename[16];            // short name of this node on a Citadel network
14         char c_fqdn[64];                // this site's fully qualified domain name
15         char c_humannode[21];           // human-readable site name
16         char c_niu_7[16];
17         uid_t c_niu_6;
18         char c_creataide;               // 1 = creating a room auto-grants room aide privileges
19         int c_sleeping;                 // watchdog timer (seconds)
20         char c_initax;                  // initial access level for new users
21         char c_regiscall;               // after c_regiscall logins user will be asked to register
22         char c_twitdetect;              // automatically move messages from problem users to trashcan
23         char c_twitroom[ROOMNAMELEN];   // name of trashcan
24         char c_moreprompt[80];          // paginator prompt
25         char c_restrict;                // require per-user permission to send Internet mail
26         long c_niu_1;
27         char c_site_location[32];       // geographic location of this Citadel site
28         char c_sysadm[26];              // name of system administrator
29         char c_niu_2[15];
30         int c_niu_3;
31         int c_maxsessions;              // maximum number of concurrent sessions allowed
32         char c_ip_addr[20];             // bind address for listening sockets
33         int c_port_number;              // port number for Citadel protocol (usually 504)
34         int c_niu_4;
35         struct ExpirePolicy c_ep;       // default expire policy for the entire site
36         int c_userpurge;                // user purge time (in days)
37         int c_roompurge;                // room purge time (in days)
38         char c_logpages[ROOMNAMELEN];
39         char c_createax;
40         long c_maxmsglen;
41         int c_min_workers;
42         int c_max_workers;
43         int c_pop3_port;
44         int c_smtp_port;
45         int c_rfc822_strict_from;
46         int c_aide_zap;
47         int c_imap_port;
48         time_t c_net_freq;
49         char c_disable_newu;
50         char c_enable_fulltext;
51         char c_baseroom[ROOMNAMELEN];
52         char c_aideroom[ROOMNAMELEN];
53         int c_purge_hour;
54         struct ExpirePolicy c_mbxep;
55         char c_ldap_host[128];
56         int c_ldap_port;
57         char c_ldap_base_dn[256];
58         char c_ldap_bind_dn[256];
59         char c_ldap_bind_pw[256];
60         int c_msa_port;
61         int c_imaps_port;
62         int c_pop3s_port;
63         int c_smtps_port;
64         char c_niu_4a;
65         char c_niu_5;
66         char c_allow_spoofing;
67         char c_journal_email;
68         char c_journal_pubmsgs;
69         char c_journal_dest[128];
70         char c_default_cal_zone[128];
71         int c_pftcpdict_port;
72         int c_niu_9;
73         int c_auth_mode;
74         char c_niu_8[256];
75         int c_niu_10;
76         char c_niu_11[256];
77         char c_niu_12[256];
78         char c_rbl_at_greeting;
79         char c_master_user[32];
80         char c_master_pass[32];
81         char c_pager_program[256];
82         char c_imap_keep_from;
83         int c_xmpp_c2s_port;
84         int c_xmpp_s2s_port;
85         time_t c_pop3_fetch;
86         time_t c_pop3_fastest;
87         int c_spam_flag_only;
88         int c_guest_logins;
89         int c_nntp_port;
90         int c_nntps_port;
91 };
92
93
94 void initialize_config_system(void);
95 void shutdown_config_system(void);
96 void put_config(void);
97 void CtdlSetConfigStr(char *, char *);
98 char *CtdlGetConfigStr(char *);
99 int CtdlGetConfigInt(char *);
100 long CtdlGetConfigLong(char *);
101 void CtdlSetConfigInt(char *key, int value);
102 void CtdlSetConfigLong(char *key, long value);
103 void CtdlDelConfig(char *key);
104 char *CtdlGetSysConfig(char *sysconfname);
105 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
106 void validate_config(void);
107 void netcfg_keyname(char *, long);