Mercurial > masqmail
comparison src/smtp_in.c @ 128:f9d5469cb648
moved the SIZE check to a better location
author | meillo@marmaro.de |
---|---|
date | Tue, 06 Jul 2010 08:18:46 +0200 |
parents | 05fe7500149d |
children | b072426cc6bb |
comparison
equal
deleted
inserted
replaced
127:05fe7500149d | 128:f9d5469cb648 |
---|---|
196 smtp_printf(out, "250-PIPELINING\r\n"); | 196 smtp_printf(out, "250-PIPELINING\r\n"); |
197 smtp_printf(out, "250 HELP\r\n"); | 197 smtp_printf(out, "250 HELP\r\n"); |
198 break; | 198 break; |
199 | 199 |
200 case SMTP_MAIL_FROM: | 200 case SMTP_MAIL_FROM: |
201 if (get_size(buffer, &msize)) { | |
202 DEBUG(5) debugf("smtp_in(): get_size: msize=%ld, conf.mms=%d\n", | |
203 msize, conf.max_msg_size); | |
204 if (conf.max_msg_size && (msize > conf.max_msg_size)) { | |
205 smtp_printf(out, "552 Message size exceeds fixed limit.\r\n"); | |
206 break; | |
207 } | |
208 } | |
209 | |
210 { | 201 { |
211 gchar buf[MAX_ADDRESS]; | 202 gchar buf[MAX_ADDRESS]; |
212 address *addr; | 203 address *addr; |
213 | 204 |
214 if (!psc->helo_seen) { | 205 if (!psc->helo_seen) { |
216 break; | 207 break; |
217 } | 208 } |
218 if (psc->from_seen) { | 209 if (psc->from_seen) { |
219 smtp_printf(out, "503 MAIL FROM: already given.\r\n"); | 210 smtp_printf(out, "503 MAIL FROM: already given.\r\n"); |
220 break; | 211 break; |
212 } | |
213 | |
214 if (get_size(buffer, &msize)) { | |
215 DEBUG(5) debugf("smtp_in(): get_size: msize=%ld, conf.mms=%d\n", | |
216 msize, conf.max_msg_size); | |
217 if (conf.max_msg_size && (msize > conf.max_msg_size)) { | |
218 smtp_printf(out, "552 Message size exceeds fixed limit.\r\n"); | |
219 break; | |
220 } | |
221 } | 221 } |
222 | 222 |
223 msg = create_message(); | 223 msg = create_message(); |
224 msg->received_host = remote_host ? g_strdup(remote_host) : NULL; | 224 msg->received_host = remote_host ? g_strdup(remote_host) : NULL; |
225 msg->received_prot = psc->prot; | 225 msg->received_prot = psc->prot; |