1 // Copyright (c) 1987-2016 by the citadel.org team
3 // This program is open source software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License version 3.
6 // This program is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 // GNU General Public License for more details.
11 #include "serv_extensions.h"
12 #include "citadel_dirs.h"
14 // This is the format of the legacy config file. Do not attempt to do anything with it other
15 // than migrate it into the new format. Seriously -- DO NOT CHANGE IT. The only purpose of this
16 // struct is to represent the OLD configuration format.
17 struct legacy_config {
18 char c_nodename[16]; // short name of this node on a Citadel network
19 char c_fqdn[64]; // this site's fully qualified domain name
20 char c_humannode[21]; // human-readable site name
23 char c_creataide; // 1 = creating a room auto-grants room aide privileges
24 int c_sleeping; // watchdog timer (seconds)
25 char c_initax; // initial access level for new users
26 char c_regiscall; // after c_regiscall logins user will be asked to register
27 char c_twitdetect; // automatically move messages from problem users to trashcan
28 char c_twitroom[ROOMNAMELEN]; // name of trashcan
29 char c_moreprompt[80]; // paginator prompt
30 char c_restrict; // require per-user permission to send Internet mail
32 char c_site_location[32]; // geographic location of this Citadel site
33 char c_sysadm[26]; // name of system administrator
36 int c_maxsessions; // maximum number of concurrent sessions allowed
37 char c_ip_addr[20]; // bind address for listening sockets
38 int c_port_number; // port number for Citadel protocol (usually 504)
40 struct ExpirePolicy c_ep; // default expire policy for the entire site
41 int c_userpurge; // user purge time (in days)
42 int c_roompurge; // room purge time (in days)
43 char c_logpages[ROOMNAMELEN];
50 int c_rfc822_strict_from;
55 char c_enable_fulltext;
56 char c_baseroom[ROOMNAMELEN];
57 char c_aideroom[ROOMNAMELEN];
59 struct ExpirePolicy c_mbxep;
60 char c_ldap_host[128];
62 char c_ldap_base_dn[256];
63 char c_ldap_bind_dn[256];
64 char c_ldap_bind_pw[256];
71 char c_allow_spoofing;
73 char c_journal_pubmsgs;
74 char c_journal_dest[128];
75 char c_default_cal_zone[128];
83 char c_rbl_at_greeting;
84 char c_master_user[32];
85 char c_master_pass[32];
86 char c_pager_program[256];
87 char c_imap_keep_from;
91 time_t c_pop3_fastest;
99 void initialize_config_system(void);
100 void shutdown_config_system(void);
101 void put_config(void);
102 void CtdlSetConfigStr(char *, char *);
103 char *CtdlGetConfigStr(char *);
104 int CtdlGetConfigInt(char *);
105 long CtdlGetConfigLong(char *);
106 void CtdlSetConfigInt(char *key, int value);
107 void CtdlSetConfigLong(char *key, long value);
108 void CtdlDelConfig(char *key);
110 char *CtdlGetSysConfig(char *sysconfname);
111 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
112 void validate_config(void);
113 void netcfg_keyname(char *, long);