# HG changeset patch # User meillo@marmaro.de # Date 1277983830 -7200 # Node ID cd59a5b4d3ddf9fc8d0433b57db8c01d07c047d1 # Parent 1e2fd87d58eab7364874e768763efc23065fad6f added support for SMTP SIZE 0 (unlimited) diff -r 1e2fd87d58ea -r cd59a5b4d3dd man/masqmail.conf.5 --- a/man/masqmail.conf.5 Thu Jul 01 13:11:38 2010 +0200 +++ b/man/masqmail.conf.5 Thu Jul 01 13:30:30 2010 +0200 @@ -491,8 +491,9 @@ Clients pretending to send, or actually send, more than \fIbytes\fR will get a 552 error message. -Default is 104857600 (= 100MB). -(This should be sufficient for most cases.) +`0' means no fixed maximum size limit is in force. + +Default is 0 (= unlimited). .SH AUTHOR diff -r 1e2fd87d58ea -r cd59a5b4d3dd src/accept.c --- a/src/accept.c Thu Jul 01 13:11:38 2010 +0200 +++ b/src/accept.c Thu Jul 01 13:30:30 2010 +0200 @@ -155,7 +155,7 @@ line_cnt++; } } - if (data_size > conf.max_msg_size) { + if (conf.max_msg_size && (data_size > conf.max_msg_size)) { DEBUG(4) debugf("accept_message_stream(): " "received %d bytes (conf.max_msg_size=%d)\n", data_size, conf.max_msg_size); diff -r 1e2fd87d58ea -r cd59a5b4d3dd src/conf.c --- a/src/conf.c Thu Jul 01 13:11:38 2010 +0200 +++ b/src/conf.c Thu Jul 01 13:30:30 2010 +0200 @@ -431,7 +431,7 @@ conf.do_relay = TRUE; conf.alias_local_cmp = strcmp; conf.max_defer_time = 86400 * 4; /* 4 days */ - conf.max_msg_size = 100*1024*1024; /* in bytes (100MB are probably enough) */ + conf.max_msg_size = 0; /* no limit on msg size */ if ((in = fopen(filename, "r")) == NULL) { fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno)); diff -r 1e2fd87d58ea -r cd59a5b4d3dd src/smtp_in.c --- a/src/smtp_in.c Thu Jul 01 13:11:38 2010 +0200 +++ b/src/smtp_in.c Thu Jul 01 13:30:30 2010 +0200 @@ -201,7 +201,7 @@ if (get_size(buffer, &msize)) { DEBUG(5) debugf("smtp_in(): get_size: msize=%ld, conf.mms=%d\n", msize, conf.max_msg_size); - if (msize > conf.max_msg_size) { + if (conf.max_msg_size && (msize > conf.max_msg_size)) { smtp_printf(out, "552 Message size exceeds fixed limit.\r\n"); break; }