1 /**
2  * Holds the data of the config file
3  */
4 struct conf {
5   char *base;		// LDAP base
6   char *uid;		// LDAP bind dn
7   char *pwd;		// LDAP bind password
8   char *server;		// LDAP server
9   char *qfilter;	// LDAP query filter
10   char *result;		// LDAP attribute containing the mail body
11   int scope;		// LDAP search scope
12   int port;		// LDAP server port
13   int protver;		// LDAP protocol version
14   char *charset;	// Locale charset for character conversion
15   char *mfilter;	// Path to dbfile, containing mail deny patterns
16   char *dbdir;		// Path where the blockfiles are stored
17   char *mta;		// Path to the MTA
18   char *mta_opts;	// Optional arguments for the MTA
19   char *blist;		// Path to dbfile, containing address deny patterns
20   char *mailheader;	// Path to the txtfile, containing standard header
21   char *mailfooter;	// Path to the txtfile, containing standard footer
22   char *map_sender;	// Macroname for "From:" header
23   char *map_receiver;	// Macroname for "To:" and "Cc:" header
24   char **recv_header;	// Which headers hold recepient addresses
25   char *map_subject;	// Macroname for "Subject:" header
26   char **macro_attr;	// List of additional LDAP attributes
27   char **macro_name;	// List of macronames for the attributes above
28   int dbexp;		// How long to block emailaddresses
29   int maxmail;		// max number of recepients allowed
30   int maxheader;	// max number of header lines allowed in mail
31   int umask;		// file creation mask for db files
32 };
33 
34 /**
35  * Enter a key/value pair into the config structure
36  * @param key the keyword from the configfile
37  * @param val the value of the keyword from the configfile
38  */
39 void putEntry(char*, char*);
40 
41 /**
42  * Fill the configstructure with default values
43  */
44 void setDefaults(void);
45 
46 /**
47  * Fill the configstructure with values from a configfile
48  * @param fname name of the configfile
49  */
50 void readConf(char*);
51