Mercurial > noffle
changeset 357:b0ee77fa24d4 noffle
[svn] * src/post.c,src/configfile.c,src/configfile.h,docs/noffle.conf.5,
noffle.conf.example,TODO: Added a config value to specify whether
a Reply-To header should be appended to messages posted without it.
Also made the new option show up in the noffle.conf manpage and the
initial example configuration shipped with the package.
author | bears |
---|---|
date | Mon, 24 Mar 2003 23:32:48 +0000 |
parents | 93e06e5ecb7a |
children | 9fdcd167f856 |
files | ChangeLog TODO docs/noffle.conf.5 noffle.conf.example src/configfile.c src/configfile.h src/post.c |
diffstat | 7 files changed, 33 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Mar 23 15:19:24 2003 +0000 +++ b/ChangeLog Mon Mar 24 23:32:48 2003 +0000 @@ -1,3 +1,11 @@ +Sat Mar 22 2003 Johannes Madel <johannes.madel@gmx.de> + +* src/post.c,src/configfile.c,src/configfile.h,docs/noffle.conf.5, + noffle.conf.example,TODO: Added a config value to specify whether + a Reply-To header should be appended to messages posted without it. + Also made the new option show up in the noffle.conf manpage and the + initial example configuration shipped with the package. + Wed Feb 26 2003 Jim Hague <jim.hague@acm.org> * src/client.c,src/group.c: Reunite forbidden group comment with code, and
--- a/TODO Sun Mar 23 15:19:24 2003 +0000 +++ b/TODO Mon Mar 24 23:32:48 2003 +0000 @@ -5,8 +5,6 @@ Urgent ------ - * Post: Only generate Reply-To: from From: if a configuration option set. - * Deal properly with headers split over several lines where the overall content of the header exceeds MAXCHAR characters (i.e. length of Str).
--- a/docs/noffle.conf.5 Sun Mar 23 15:19:24 2003 +0000 +++ b/docs/noffle.conf.5 Mon Mar 24 23:32:48 2003 +0000 @@ -1,5 +1,5 @@ .TH noffle.conf 5 -.\" $Id: noffle.conf.5 422 2003-01-11 09:30:05Z bears $ +.\" $Id: noffle.conf.5 495 2003-03-24 23:32:48Z bears $ .SH NAME noffle.conf \- Configuration file for NOFFLE news server @@ -256,6 +256,15 @@ Default: <the fully qualified domain name of your system> .TP +.B append-reply-to yes|no +Append a 'Reply-To:' header to messages posted without it. +The address from the 'From:' header is used. Though this might seem +pretty useless at first glance it may be desireable as some providers were +known to overwrite the 'From:' header. +.br +Default: yes + +.TP .B path-header <path header content> Articles posted without a Path: header have one added by NOFFLE. When
--- a/noffle.conf.example Sun Mar 23 15:19:24 2003 +0000 +++ b/noffle.conf.example Mon Mar 24 23:32:48 2003 +0000 @@ -65,6 +65,10 @@ #hostname UserId-XXXXX_newsserver #hostname %user@domain.tld +# Append a "Reply-To" header with the address mentioned in the "From" header. +# gererally a good idea +append-reply-to yes + # Post articles to remote groups into the local database immediately # on receipt of article. #post-locally no
--- a/src/configfile.c Sun Mar 23 15:19:24 2003 +0000 +++ b/src/configfile.c Mon Mar 24 23:32:48 2003 +0000 @@ -6,7 +6,7 @@ SPOOLDIR VERSION - $Id: configfile.c 422 2003-01-11 09:30:05Z bears $ + $Id: configfile.c 495 2003-03-24 23:32:48Z bears $ */ #if HAVE_CONFIG_H @@ -76,6 +76,7 @@ Bool autoSubscribe; Bool autoUnsubscribe; Bool infoAlways; + Bool appendReplyTo; Bool replaceMsgId; Str hostnameMsgId; Bool postLocal; @@ -109,6 +110,7 @@ FALSE, /* autoSubscribe */ FALSE, /* autoUnsubscribe */ TRUE, /* infoAlways */ + TRUE, /* appendReplyTo */ FALSE, /* replaceMsgId */ "", /* hostnameMsgId */ FALSE, /* postLocal */ @@ -143,6 +145,7 @@ Bool Cfg_autoUnsubscribe( void ) { return config.autoUnsubscribe; } Bool Cfg_autoSubscribe( void ) { return config.autoSubscribe; } Bool Cfg_infoAlways( void ) { return config.infoAlways; } +Bool Cfg_appendReplyTo ( void ) { return config.appendReplyTo; } Bool Cfg_replaceMsgId( void ) { return config.replaceMsgId; } const char * Cfg_hostnameMsgId( void ) { return config.hostnameMsgId; } Bool Cfg_postLocal( void ) { return config.postLocal; } @@ -948,6 +951,8 @@ getBool( &config.autoUnsubscribe, p ); else if ( strcmp( "info-always-unread", name ) == 0 ) getBool( &config.infoAlways, p ); + else if ( strcmp( "append-reply-to", name ) == 0 ) + getBool( &config.appendReplyTo, p); else if ( strcmp( "replace-messageid", name ) == 0 ) getBool( &config.replaceMsgId, p ); else if ( strcmp( "hostname", name ) == 0 )
--- a/src/configfile.h Sun Mar 23 15:19:24 2003 +0000 +++ b/src/configfile.h Mon Mar 24 23:32:48 2003 +0000 @@ -3,7 +3,7 @@ Common declarations and handling of the configuration file. - $Id: configfile.h 419 2003-01-10 23:11:43Z bears $ + $Id: configfile.h 495 2003-03-24 23:32:48Z bears $ */ #ifndef CONFIGFILE_H @@ -28,6 +28,7 @@ Bool Cfg_autoUnsubscribe( void ); Bool Cfg_autoSubscribe( void ); Bool Cfg_infoAlways( void ); +Bool Cfg_appendReplyTo ( void ); Bool Cfg_replaceMsgId( void ); const char * Cfg_hostnameMsgId( void );
--- a/src/post.c Sun Mar 23 15:19:24 2003 +0000 +++ b/src/post.c Mon Mar 24 23:32:48 2003 +0000 @@ -1,7 +1,7 @@ /* post.c - $Id: post.c 414 2003-01-06 18:16:18Z bears $ + $Id: post.c 495 2003-03-24 23:32:48Z bears $ */ #if HAVE_CONFIG_H @@ -380,8 +380,8 @@ DynStr_appLn( s, path ); } - /* Ensure Reply-To header */ - if ( ! replyToFound ) + /* Ensure Reply-To header if configuration demands it */ + if ( ! replyToFound && Cfg_appendReplyTo() ) { Log_dbg( LOG_DBG_POST, "Adding Reply-To field to posted message." ); DynStr_app( s, "Reply-To: " );