masqmail
diff src/conf.c @ 192:89f951be358f
REMOVED POP3 SUPPORT
masqmail will not include a POP3 client anymore from 0.3.0 on
maybe the POP3 code will be reworked into a standalone program
some day
if you rely on the POP3 client, use fetchmail or something similar
instead
author | meillo@marmaro.de |
---|---|
date | Thu, 15 Jul 2010 14:24:40 +0200 |
parents | 6b4a101a2455 |
children | 4fd237550525 |
line diff
1.1 --- a/src/conf.c Thu Jul 15 11:48:33 2010 +0200 1.2 +++ b/src/conf.c Thu Jul 15 14:24:40 2010 +0200 1.3 @@ -548,22 +548,7 @@ 1.4 conf.online_pipe = g_strdup(rval); 1.5 else if (strcmp(lval, "do_queue") == 0) 1.6 conf.do_queue = parse_boolean(rval); 1.7 - else if (strncmp(lval, "get.", 4) == 0) { 1.8 -#ifdef ENABLE_POP3 1.9 - table_pair *pair = create_pair_string(&(lval[4]), rval); 1.10 - conf.get_names = g_list_append(conf.get_names, pair); 1.11 -#else 1.12 - logwrite(LOG_WARNING, "get.<name> ignored: not compiled with pop support\n"); 1.13 -#endif 1.14 - } else if (strncmp(lval, "online_gets.", 12) == 0) { 1.15 -#ifdef ENABLE_POP3 1.16 - GList *file_list = parse_list(rval, FALSE); 1.17 - table_pair *pair = create_pair(&(lval[12]), file_list); 1.18 - conf.online_gets = g_list_append(conf.online_gets, pair); 1.19 -#else 1.20 - logwrite(LOG_WARNING, "online_gets.<name> ignored: not compiled with pop support\n"); 1.21 -#endif 1.22 - } else if (strcmp(lval, "errmsg_file") == 0) 1.23 + else if (strcmp(lval, "errmsg_file") == 0) 1.24 conf.errmsg_file = g_strdup(rval); 1.25 else if (strcmp(lval, "warnmsg_file") == 0) 1.26 conf.warnmsg_file = g_strdup(rval); 1.27 @@ -896,100 +881,6 @@ 1.28 g_list_free(list); 1.29 } 1.30 1.31 -#ifdef ENABLE_POP3 1.32 - 1.33 -get_conf* 1.34 -read_get_conf(gchar * filename) 1.35 -{ 1.36 - FILE *in; 1.37 - 1.38 - get_conf *gc = g_malloc(sizeof(get_conf)); 1.39 - memset(gc, 0, sizeof(get_conf)); 1.40 - 1.41 - gc->server_port = 110; 1.42 - 1.43 - if ((in = fopen(filename, "r")) == NULL) { 1.44 - logwrite(LOG_ALERT, "could not open get file %s: %s\n", filename, strerror(errno)); 1.45 - g_free(gc); 1.46 - return NULL; 1.47 - } 1.48 - 1.49 - gchar lval[256], rval[2048]; 1.50 - while (read_statement(in, lval, 256, rval, 2048)) { 1.51 - if (strcmp(lval, "protocol") == 0) 1.52 - gc->protocol = g_strdup(rval); 1.53 - else if (strcmp(lval, "server") == 0) 1.54 - gc->server_name = g_strdup(rval); 1.55 - else if (strcmp(lval, "port") == 0) 1.56 - gc->server_port = atoi(rval); 1.57 - else if (strcmp(lval, "wrapper") == 0) 1.58 - gc->wrapper = g_strdup(rval); 1.59 - else if (strcmp(lval, "user") == 0) 1.60 - gc->login_user = g_strdup(rval); 1.61 - else if (strcmp(lval, "pass") == 0) 1.62 - gc->login_pass = g_strdup(rval); 1.63 - else if (strcmp(lval, "address") == 0) 1.64 - gc->address = create_address_qualified(rval, TRUE, conf.host_name); 1.65 - else if (strcmp(lval, "return_path") == 0) 1.66 - gc->return_path = create_address_qualified(rval, TRUE, conf.host_name); 1.67 - else if (strcmp(lval, "do_ssl") == 0) 1.68 - /* we ignore this. This option is used by sqilconf */ 1.69 - ; 1.70 - else if (strcmp(lval, "do_keep") == 0) 1.71 - gc->do_keep = parse_boolean(rval); 1.72 - else if (strcmp(lval, "do_uidl") == 0) 1.73 - gc->do_uidl = parse_boolean(rval); 1.74 - else if (strcmp(lval, "do_uidl_dele") == 0) 1.75 - gc->do_uidl_dele = parse_boolean(rval); 1.76 - else if (strcmp(lval, "max_size") == 0) 1.77 - gc->max_size = atoi(rval); 1.78 - else if (strcmp(lval, "max_size_delete") == 0) 1.79 - gc->max_size_delete = parse_boolean(rval); 1.80 - else if (strcmp(lval, "max_count") == 0) 1.81 - gc->max_count = atoi(rval); 1.82 - else if (strcmp(lval, "resolve_list") == 0) 1.83 - gc->resolve_list = parse_resolve_list(rval); 1.84 - else 1.85 - logwrite(LOG_WARNING, "var '%s' not (yet) known, ignored\n", lval); 1.86 - } 1.87 - fclose(in); 1.88 - 1.89 - if (gc->resolve_list == NULL) { 1.90 -#ifdef ENABLE_RESOLVER 1.91 - gc->resolve_list = g_list_append(NULL, resolve_dns_a); 1.92 -#endif 1.93 - gc->resolve_list = g_list_append(NULL, resolve_byname); 1.94 - } 1.95 - 1.96 - if (gc->protocol == NULL) 1.97 - gc->protocol = g_strdup("pop3"); 1.98 - return gc; 1.99 -} 1.100 - 1.101 -void 1.102 -destroy_get_conf(get_conf * gc) 1.103 -{ 1.104 - if (gc->protocol) 1.105 - g_free(gc->protocol); 1.106 - if (gc->server_name) 1.107 - g_free(gc->server_name); 1.108 - if (gc->login_user) 1.109 - g_free(gc->login_user); 1.110 - if (gc->login_pass) 1.111 - g_free(gc->login_pass); 1.112 - if (gc->wrapper) 1.113 - g_free(gc->wrapper); 1.114 - if (gc->address) 1.115 - destroy_address(gc->address); 1.116 - if (gc->return_path) 1.117 - destroy_address(gc->return_path); 1.118 - if (gc->resolve_list) 1.119 - g_list_free(gc->resolve_list); 1.120 - g_free(gc); 1.121 -} 1.122 - 1.123 -#endif 1.124 - 1.125 connect_route* 1.126 create_local_route() 1.127 {