masqmail-0.2

changeset 120:cd59a5b4d3dd

added support for SMTP SIZE 0 (unlimited)
author meillo@marmaro.de
date Thu, 01 Jul 2010 13:30:30 +0200
parents 1e2fd87d58ea
children dabd4e706b78
files man/masqmail.conf.5 src/accept.c src/conf.c src/smtp_in.c
diffstat 4 files changed, 6 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/man/masqmail.conf.5	Thu Jul 01 13:11:38 2010 +0200
     1.2 +++ b/man/masqmail.conf.5	Thu Jul 01 13:30:30 2010 +0200
     1.3 @@ -491,8 +491,9 @@
     1.4  Clients pretending to send, or actually send,
     1.5  more than \fIbytes\fR will get a 552 error message.
     1.6  
     1.7 -Default is 104857600 (= 100MB).
     1.8 -(This should be sufficient for most cases.)
     1.9 +`0' means no fixed maximum size limit is in force.
    1.10 +
    1.11 +Default is 0 (= unlimited).
    1.12  
    1.13  
    1.14  .SH AUTHOR
     2.1 --- a/src/accept.c	Thu Jul 01 13:11:38 2010 +0200
     2.2 +++ b/src/accept.c	Thu Jul 01 13:30:30 2010 +0200
     2.3 @@ -155,7 +155,7 @@
     2.4  				line_cnt++;
     2.5  			}
     2.6  		}
     2.7 -		if (data_size > conf.max_msg_size) {
     2.8 +		if (conf.max_msg_size && (data_size > conf.max_msg_size)) {
     2.9  			DEBUG(4) debugf("accept_message_stream(): "
    2.10  					"received %d bytes (conf.max_msg_size=%d)\n",
    2.11  			                data_size, conf.max_msg_size);
     3.1 --- a/src/conf.c	Thu Jul 01 13:11:38 2010 +0200
     3.2 +++ b/src/conf.c	Thu Jul 01 13:30:30 2010 +0200
     3.3 @@ -431,7 +431,7 @@
     3.4  	conf.do_relay = TRUE;
     3.5  	conf.alias_local_cmp = strcmp;
     3.6  	conf.max_defer_time = 86400 * 4;  /* 4 days */
     3.7 -	conf.max_msg_size = 100*1024*1024; /* in bytes (100MB are probably enough) */
     3.8 +	conf.max_msg_size = 0; /* no limit on msg size */
     3.9  
    3.10  	if ((in = fopen(filename, "r")) == NULL) {
    3.11  		fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno));
     4.1 --- a/src/smtp_in.c	Thu Jul 01 13:11:38 2010 +0200
     4.2 +++ b/src/smtp_in.c	Thu Jul 01 13:30:30 2010 +0200
     4.3 @@ -201,7 +201,7 @@
     4.4  			if (get_size(buffer, &msize)) {
     4.5  				DEBUG(5) debugf("smtp_in(): get_size: msize=%ld, conf.mms=%d\n",
     4.6  				                msize, conf.max_msg_size);
     4.7 -				if (msize > conf.max_msg_size) {
     4.8 +				if (conf.max_msg_size && (msize > conf.max_msg_size)) {
     4.9  					smtp_printf(out, "552 Message size exceeds fixed limit.\r\n");
    4.10  					break;
    4.11  				}