masqmail

diff src/conf.c @ 117:5ec5e6637049

added server-side SMTP SIZE support (patch by Paolo) ``SIZE 0'' (= unlimited) is currently not supported client-side support was already implemented
author meillo@marmaro.de
date Thu, 01 Jul 2010 13:08:53 +0200
parents 315773f814f7
children cd59a5b4d3dd
line diff
     1.1 --- a/src/conf.c	Wed Jun 30 15:45:34 2010 +0200
     1.2 +++ b/src/conf.c	Thu Jul 01 13:08:53 2010 +0200
     1.3 @@ -431,6 +431,7 @@
     1.4  	conf.do_relay = TRUE;
     1.5  	conf.alias_local_cmp = strcmp;
     1.6  	conf.max_defer_time = 86400 * 4;  /* 4 days */
     1.7 +	conf.max_msg_size = 100*1024*1024; /* in bytes (100MB are probably enough) */
     1.8  
     1.9  	if ((in = fopen(filename, "r")) == NULL) {
    1.10  		fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno));
    1.11 @@ -581,7 +582,11 @@
    1.12  				conf.max_defer_time = ival;
    1.13  		} else if (strcmp(lval, "log_user") == 0)
    1.14  			conf.log_user = g_strdup(rval);
    1.15 -
    1.16 +		else if(strcmp(lval, "max_msg_size") == 0) {
    1.17 +			conf.max_msg_size = atol(rval);
    1.18 +			DEBUG(6) fprintf(stderr,"rval=%s, conf.max_msg_size=%ld\n",
    1.19 +			                 rval, conf.max_msg_size);
    1.20 +		}
    1.21  		else
    1.22  			fprintf(stderr, "var '%s' not (yet) known, ignored\n", lval);
    1.23  	}