/* * ImapProxy - a caching IMAP proxy daemon * Copyright (C) 2002 Steven Van Acker * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef __CONFIG_FILE_H__ #define __CONFIG_FILE_H__ #define CONFIG_ACCESS_LIST_BLOCK 0 #define CONFIG_ACCESS_LIST_ACCEPT 1 struct access_list_t { unsigned long ip; unsigned long mask; int action; }; typedef struct conffunc_t { int (*f)(char *,char *); } ConfigFunction; extern unsigned long config_remote_address,config_local_address; /* remote and local address * the remote address is the imap server to connect to * the local address is the local interface to bind to */ extern unsigned int config_remote_port,config_local_port; /* remote and local port * remote port is the port to which to connect (usually 143) * local port is the port to listen to */ extern struct access_list_t *config_accesslist; /* access list */ extern unsigned int config_access_count; /* number of access list entries */ extern int config_enable_debug; /* 1 to enable debug messages, 0 to disable */ extern int config_log_facility; /* log facility... see man syslog for more info */ extern int config_enable_logging; /* 1 to enable logging to syslog, 0 to disable */ extern int config_client_timeout; /* time in seconds after which an idle client is diconnected */ extern int config_server_timeout; /* time in seconds after which an inactive server connection is closed */ extern int config_keepalive; /* time in seconds after which a keepalive (NOOP) message is sent to the server */ extern int config_max_reuse; /* number of times a record can be re-used (go from inactive to active). */ extern int config_stats_frequency; /* number of seconds between 2 stats messages */ extern int config_file_read(char *); extern void configfile_print(char *); extern int check_if_blocked(unsigned long); #endif /* __CONFIG_FILE__ */