comparison 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
comparison
equal deleted inserted replaced
221:0eaf93997170 222:bf290632d29e
1 /* 1 /*
2 post.c 2 post.c
3 3
4 $Id: post.c 316 2001-10-31 11:44:53Z bears $ 4 $Id: post.c 341 2001-12-09 11:32:31Z bears $
5 */ 5 */
6 6
7 #if HAVE_CONFIG_H 7 #if HAVE_CONFIG_H
8 #include <config.h> 8 #include <config.h>
9 #endif 9 #endif
288 } 288 }
289 DynStr_app( s, "Date: " ); 289 DynStr_app( s, "Date: " );
290 DynStr_appLn( s, article.over.date ); 290 DynStr_appLn( s, article.over.date );
291 291
292 /* Ensure Message ID is present and valid */ 292 /* Ensure Message ID is present and valid */
293 if ( Cfg_replaceMsgId() ) 293 if ( article.over.msgId[ 0 ] == '\0' )
294 {
295 Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" );
296 Log_inf( "Adding missing Message-ID '%s'", article.over.msgId );
297 }
298 else if ( ! Prt_isValidMsgId( article.over.msgId ) || Cfg_replaceMsgId() )
294 { 299 {
295 Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" ); 300 Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" );
296 Log_dbg( LOG_DBG_POST, 301 Log_dbg( LOG_DBG_POST,
297 "Replacing Message-ID with '%s'", 302 "Replacing Message-ID with '%s'",
298 article.over.msgId ); 303 article.over.msgId );
299 }
300 else if ( article.over.msgId[ 0 ] == '\0' )
301 {
302 Prt_genMsgId( article.over.msgId, article.over.from, "NOFFLE" );
303 Log_inf( "Adding missing Message-ID '%s'", article.over.msgId );
304 } 304 }
305 DynStr_app( s, "Message-ID: " ); 305 DynStr_app( s, "Message-ID: " );
306 DynStr_appLn( s, article.over.msgId ); 306 DynStr_appLn( s, article.over.msgId );
307 307
308 /* Ensure Path header */ 308 /* Ensure Path header */