# HG changeset patch # User Jim Hague # Date 1376478279 -3600 # Node ID 614a3177b15cf1024f58beae315e577afc600c7c # Parent 1c4d3397e99f79be077f5785622fd30aa789194a Add mail-from option. Some modern mail systems will try and ensure the sender email is a legitimate address. Which will fail if there isn't such an address. diff -r 1c4d3397e99f -r 614a3177b15c Makefile.in --- a/Makefile.in Wed Aug 14 11:50:21 2013 +0100 +++ b/Makefile.in Wed Aug 14 12:04:39 2013 +0100 @@ -759,7 +759,6 @@ $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/requested $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/outgoing $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/overview - $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/articles chown -R news:news $(DESTDIR)$(SPOOLDIR) $(INSTALL) -m 0755 -o 0 -g 0 -d $(DESTDIR)$(DOCDIR) $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/AUTHORS $(DESTDIR)$(DOCDIR) diff -r 1c4d3397e99f -r 614a3177b15c NEWS --- a/NEWS Wed Aug 14 11:50:21 2013 +0100 +++ b/NEWS Wed Aug 14 12:04:39 2013 +0100 @@ -1,6 +1,11 @@ Current development version: ---------------------------- +1.2.0-rc2 +--------- + +* Add new 'mail-from' config item. + 1.2.0-rc1 --------- diff -r 1c4d3397e99f -r 614a3177b15c docs/noffle.conf.5 --- a/docs/noffle.conf.5 Wed Aug 14 11:50:21 2013 +0100 +++ b/docs/noffle.conf.5 Wed Aug 14 12:04:39 2013 +0100 @@ -139,6 +139,12 @@ Default: .TP +.B mail\-from
+Email address used as the From: address in failed posting emails. +.br +Default: noffle@localhost + +.TP .B auto\-unsubscribe yes|no Automatically remove groups from fetch list if they have not been accessed for a number of days. Groups are only unsubscribed if there diff -r 1c4d3397e99f -r 614a3177b15c noffle.conf.example --- a/noffle.conf.example Wed Aug 14 11:50:21 2013 +0100 +++ b/noffle.conf.example Wed Aug 14 12:04:39 2013 +0100 @@ -19,10 +19,12 @@ # Only get binaries groups from server 'bins' # getgroups *.binaries.* -# Mail address for failed postings - +# Email notifications of failed postings to this address. +# Leave blank to have address extracted from the posted article. #mail-to root +# From address for emailed notifications of failed postings. +#mail-from news@example.com # Never get more than articles. Discard oldest, if there are more diff -r 1c4d3397e99f -r 614a3177b15c src/configfile.c --- a/src/configfile.c Wed Aug 14 11:50:21 2013 +0100 +++ b/src/configfile.c Wed Aug 14 12:04:39 2013 +0100 @@ -83,6 +83,7 @@ Bool clientAuth; Str defaultAutoSubscribeMode; Str mailTo; + Str mailFrom; int defaultExpire; int numServ; int maxServ; @@ -118,6 +119,7 @@ FALSE, /* clientAuth */ "over", /* defaultAutoSubscribeMode */ "", /* mailTo */ + "noffle@localhost", /* mailFrom */ 14, /* defaultExpire */ 0, /* numServ */ 0, /* maxServ */ @@ -154,6 +156,7 @@ Bool Cfg_needClientAuth( void ) { return config.clientAuth; } const char * Cfg_defaultAutoSubscribeMode( void ) { return config.defaultAutoSubscribeMode; } +const char * Cfg_mailFrom( void ) { return config.mailFrom; } const char * Cfg_mailTo( void ) { return config.mailTo; } int Cfg_defaultExpire( void ) { return config.defaultExpire; } const char * Cfg_pathHeader( void ) { return config.pathHeader; } @@ -989,6 +992,8 @@ else Utl_cpyStr( config.defaultAutoSubscribeMode, s ); } + else if ( strcmp( "mail-from", name ) == 0 ) + getStr( config.mailFrom, p ); else if ( strcmp( "mail-to", name ) == 0 ) getStr( config.mailTo, p ); else if ( strcmp( "expire", name ) == 0 ) diff -r 1c4d3397e99f -r 614a3177b15c src/configfile.h --- a/src/configfile.h Wed Aug 14 11:50:21 2013 +0100 +++ b/src/configfile.h Wed Aug 14 12:04:39 2013 +0100 @@ -34,6 +34,7 @@ const char * Cfg_hostnameMsgId( void ); Bool Cfg_postLocal( void ); const char * Cfg_mailTo( void ); +const char * Cfg_mailFrom( void ); Bool Cfg_addMsgIdIfMissing( void ); /* Begin iteration through the server names */ diff -r 1c4d3397e99f -r 614a3177b15c src/fetch.c --- a/src/fetch.c Wed Aug 14 11:50:21 2013 +0100 +++ b/src/fetch.c Wed Aug 14 12:04:39 2013 +0100 @@ -324,6 +324,7 @@ { fprintf( f, "To: %s\n" + "From: %s\n" "Subject: [ NOFFLE: Posting failed ]\n" "\n" "\t[ NOFFLE: POSTING OF ARTICLE FAILED ]\n" @@ -337,7 +338,7 @@ "\n" "%s" ".\n", - sender, + sender, Cfg_mailFrom(), reason, article ); ret = pclose( f ); if ( ret != EXIT_SUCCESS )