Weekend W.I.P. checkin
[users/jgh/exim.git] / src / src / spool_mbox.c
index 946a0728797faa69b8d05f0b8a78f23355ed4e26..8fa3f6883b5feacedbaf9843d4bd4ef16696c5b8 100644 (file)
@@ -1,11 +1,10 @@
-/* $Cambridge: exim/src/src/spool_mbox.c,v 1.1.2.1 2004/11/26 09:13:34 tom Exp $ */
+/* $Cambridge: exim/src/src/spool_mbox.c,v 1.1.2.2 2004/11/26 16:04:26 tom Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* This file is part of the exiscan-acl content scanner
-patch. It is NOT part of the standard exim distribution. */
+#ifdef WITH_CONTENT_SCAN
 
 /* Copyright (c) Tom Kistner <tom@duncanthrax.net> 2003-???? */
 /* License: GPL */
@@ -17,9 +16,10 @@ sub directory of exim's spool directory. */
 
 /* externals, we must reset them on unspooling */
 extern int demime_ok;
+extern struct file_extension *file_extensions;
+
 extern int malware_ok;
 extern int spam_ok;
-extern struct file_extension *file_extensions;
 
 int spool_mbox_ok = 0;
 uschar spooled_message_id[17];
@@ -36,11 +36,6 @@ FILE *spool_mbox(unsigned long long *mbox_file_size) {
   struct stat statbuf;
   int i,j;
   
-  /*
-  uschar *received;
-  uschar *timestamp;
-  */
-  
   if (!spool_mbox_ok) {
     /* create scan directory, if not present */
     if (!directory_make(spool_directory, US "scan", 0750, FALSE)) {
@@ -64,31 +59,6 @@ FILE *spool_mbox(unsigned long long *mbox_file_size) {
       return NULL;
     };
     
-    /* Generate a preliminary Received: header and put it in the file.
-       We need to do this so SA can do DNS list checks */
-       
-    /* removed for 4.34
-    
-    timestamp = expand_string(US"${tod_full}");
-    received = expand_string(received_header_text);
-    if (received != NULL) {
-      uschar *my_received;
-      if (received[0] == 0) {
-        my_received = string_sprintf("Received: ; %s\n", timestamp);
-      }
-      else {
-        my_received = string_sprintf("%s; %s\n", received, timestamp);
-      }
-      i = fwrite(my_received, 1, Ustrlen(my_received), mbox_file);
-      if (i != Ustrlen(my_received)) {
-        debug_printf("error/short write on writing in: %s", mbox_path);
-        fclose(mbox_file);
-        return NULL;
-      };
-    };
-    
-    */
-    
     /* write all header lines to mbox file */
     my_headerlist = header_list;
     while (my_headerlist != NULL) {
@@ -196,3 +166,5 @@ void unspool_mbox(void) {
     };
   };
 }
+
+#endif