]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/smtp_in.c
Increase incoming SMTP command buffer size from 512 to 2048 (see RFC
[user/henk/code/exim.git] / src / src / smtp_in.c
index 98a8d6ddfb4707c2f3a3e298c16d18853efbbf35..7348e9b15ac6a953426c6a0ad879054d6c7c76dd 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.12 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.14 2005/03/22 10:11:43 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -34,9 +34,12 @@ int deny_severity  = LOG_NOTICE;
 #endif
 
 
-/* Size of buffer for reading SMTP commands */
+/* Size of buffer for reading SMTP commands. We used to use 512, as defined
+by RFC 821. However, RFC 1869 specifies that this must be increased for SMTP
+commands that accept arguments, and this in particular applies to AUTH, where
+the data can be quite long. */
 
-#define cmd_buffer_size  512      /* Ref. RFC 821 */
+#define cmd_buffer_size  2048
 
 /* Size of buffer for reading SMTP incoming packets */
 
@@ -1262,16 +1265,16 @@ if (!sender_host_unknown)
   if (!host_checking && !sender_host_notsocket)
     {
     #if OPTSTYLE == 1
-    SOCKLEN_T optlen = sizeof(struct ip_options) + MAX_IPOPTLEN;
+    EXIM_SOCKLEN_T optlen = sizeof(struct ip_options) + MAX_IPOPTLEN;
     struct ip_options *ipopt = store_get(optlen);
     #elif OPTSTYLE == 2
     struct ip_opts ipoptblock;
     struct ip_opts *ipopt = &ipoptblock;
-    SOCKLEN_T optlen = sizeof(ipoptblock);
+    EXIM_SOCKLEN_T optlen = sizeof(ipoptblock);
     #else
     struct ipoption ipoptblock;
     struct ipoption *ipopt = &ipoptblock;
-    SOCKLEN_T optlen = sizeof(ipoptblock);
+    EXIM_SOCKLEN_T optlen = sizeof(ipoptblock);
     #endif
 
     /* Occasional genuine failures of getsockopt() have been seen - for