diff src/post.c @ 222:bf290632d29e noffle

[svn] * src/post.c: Always replace message ID in posted message if existing message ID fails Prt_isValidMsgId. * noffle.conf.example,docs/noffle.conf.5,src/configfile.c: Change replace-messageid default from 'yes' to 'no'. These days bad message IDs from newsreaders shouldn't happen (or should be more easily fixable from the newsreader config), and replacing message IDs causes havoc if you're gatewaying mailing lists or similar.
author bears
date Sun, 09 Dec 2001 11:32:31 +0000
parents 24d4cd032da5
children ffb1848a39db
line wrap: on
line diff
--- a/src/post.c	Sun Dec 02 19:32:44 2001 +0000
+++ b/src/post.c	Sun Dec 09 11:32:31 2001 +0000
@@ -1,7 +1,7 @@
 /*
   post.c
 
-  $Id: post.c 316 2001-10-31 11:44:53Z bears $
+  $Id: post.c 341 2001-12-09 11:32:31Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -290,18 +290,18 @@
     DynStr_appLn( s, article.over.date );
 
     /* Ensure Message ID is present and valid */
-    if ( Cfg_replaceMsgId() )
+    if ( article.over.msgId[ 0 ] == '\0' )
+    {
+	Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" );
+	Log_inf( "Adding missing Message-ID '%s'", article.over.msgId );
+    }
+    else if ( ! Prt_isValidMsgId( article.over.msgId ) || Cfg_replaceMsgId() )
     {
 	Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" );
 	Log_dbg( LOG_DBG_POST,
 		 "Replacing Message-ID with '%s'",
 		 article.over.msgId );
     }
-    else if ( article.over.msgId[ 0 ] == '\0' )
-    {
-	Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" );
-	Log_inf( "Adding missing Message-ID '%s'", article.over.msgId );
-    }
     DynStr_app( s, "Message-ID: " );
     DynStr_appLn( s, article.over.msgId );