Mercurial > masqmail
changeset 120:cd59a5b4d3dd
added support for SMTP SIZE 0 (unlimited)
author | meillo@marmaro.de |
---|---|
date | Thu, 01 Jul 2010 13:30:30 +0200 (2010-07-01) |
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 wrap: on
line diff
--- 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
--- 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);
--- 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));
--- 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; }