Set mainlog_name and rejectlog_name unconditionally.
[exim.git] / src / src / log.c
index 9f3f45e2a2c41525d375f61d979a8415b1f4fb6e..2cf578069d780002d56b9a2a0d18122f77113e90 100644 (file)
@@ -105,7 +105,8 @@ static const uschar * exim_errstrings[] = {
   US"Negotiation failed for proxy configured host",
   US"Authenticator 'other' failure",
   US"target not supporting SMTPUTF8",
-  US"",
+  US"host is local",
+  US"tainted filename",
 
   US"Not time for routing",
   US"Not time for local delivery",
@@ -402,18 +403,20 @@ it gets statted to see if it has been cycled. With a datestamp, the datestamp
 will be compared. The static slot for saving it is the same size as buffer,
 and the text has been checked above to fit, so this use of strcpy() is OK. */
 
-if (type == lt_main && string_datestamp_offset >= 0)
+if (type == lt_main)
   {
   Ustrcpy(mainlog_name, buffer);
-  mainlog_datestamp = mainlog_name + string_datestamp_offset;
+  if (string_datestamp_offset > 0)
+    mainlog_datestamp = mainlog_name + string_datestamp_offset;
   }
 
 /* Ditto for the reject log */
 
-else if (type == lt_reject && string_datestamp_offset >= 0)
+else if (type == lt_reject)
   {
   Ustrcpy(rejectlog_name, buffer);
-  rejectlog_datestamp = rejectlog_name + string_datestamp_offset;
+  if (string_datestamp_offset > 0)
+    rejectlog_datestamp = rejectlog_name + string_datestamp_offset;
   }
 
 /* and deal with the debug log (which keeps the datestamp, but does not