File: config.h

package info (click to toggle)
gnarwl 3.6.dfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 856 kB
  • ctags: 288
  • sloc: ansic: 1,163; makefile: 119; sh: 70; php: 44
file content (54 lines) | stat: -rw-r--r-- 1,985 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
 * Holds the data of the config file
 */
struct conf {
  char *uri;		// LDAP uri
  char *ca_cert;	// LDAP TLS_CACERTFILE
  int starttls;     //
  char *base;		// LDAP base
  char *uid;		// LDAP bind dn
  char *pwd;		// LDAP bind password
  char *server;		// LDAP server
  char *qfilter;	// LDAP query filter
  char *result;		// LDAP attribute containing the mail body
  int scope;		// LDAP search scope
  int port;		// LDAP server port
  int protver;		// LDAP protocol version
  char *charset;	// Locale charset for character conversion
  char *mfilter;	// Path to dbfile, containing mail deny patterns
  char *dbdir;		// Path where the blockfiles are stored
  char *mta;		// Path to the MTA
  char *mta_opts;	// Optional arguments for the MTA
  char *blist;		// Path to dbfile, containing address deny patterns
  char *mailheader;	// Path to the txtfile, containing standard header
  char *mailfooter;	// Path to the txtfile, containing standard footer
  char *map_sender;	// Macroname for "From:" header
  char *map_receiver;	// Macroname for "To:" and "Cc:" header
  char **recv_header;	// Which headers hold recepient addresses
  char *map_subject;	// Macroname for "Subject:" header
  char **macro_attr;	// List of additional LDAP attributes
  char **macro_name;	// List of macronames for the attributes above
  int dbexp;		// How long to block emailaddresses
  int maxmail;		// max number of recepients allowed
  int maxheader;	// max number of header lines allowed in mail
  int umask;		// file creation mask for db files
  int deref;		// When to follow LDAP aliases
};

/**
 * Enter a key/value pair into the config structure
 * @param key the keyword from the configfile
 * @param val the value of the keyword from the configfile
 */
void putEntry(char*, char*);

/**
 * Fill the configstructure with default values
 */
void setDefaults(void);

/**
 * Fill the configstructure with values from a configfile
 * @param fname name of the configfile
 */
void readConf(char*);