Added /sender_retain facility to control=submission, named by analogy
[exim.git] / src / src / exim.c
index bfdcbc6e02b27a4cb6b6c018f249e515f6ce1964..c8d1917a4f017d4ab1e1aa32669239734982e698 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.c,v 1.3 2004/10/18 09:16:57 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.5 2004/10/19 11:04:26 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -2837,12 +2837,21 @@ else
       strerror(errno));
     rlp.rlim_cur = rlp.rlim_max = 0;
     }
+    
+  /* I originally chose 1000 as a nice big number that was unlikely to 
+  be exceeded. It turns out that some older OS have a fixed upper limit of
+  256. */
+     
   if (rlp.rlim_cur < 1000)
     {
     rlp.rlim_cur = rlp.rlim_max = 1000;
     if (setrlimit(RLIMIT_NOFILE, &rlp) < 0)
-      log_write(0, LOG_MAIN|LOG_PANIC, "setrlimit(RLIMIT_NOFILE) failed: %s",
-        strerror(errno));
+      { 
+      rlp.rlim_cur = rlp.rlim_max = 256;
+      if (setrlimit(RLIMIT_NOFILE, &rlp) < 0)
+        log_write(0, LOG_MAIN|LOG_PANIC, "setrlimit(RLIMIT_NOFILE) failed: %s",
+          strerror(errno));
+      } 
     }
   #endif
 
@@ -4384,6 +4393,11 @@ while (more)
     int rcount = 0;
     int count = argc - recipients_arg;
     uschar **list = argv + recipients_arg;
+    
+    /* These options cannot be changed dynamically for non-SMTP messages */
+    
+    active_local_sender_retain = local_sender_retain;
+    active_local_from_check = local_from_check;   
 
     /* Save before any rewriting */