Mercurial > noffle
diff src/configfile.c @ 500:614a3177b15c noffle tip
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.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Wed, 14 Aug 2013 12:04:39 +0100 |
parents | 372f8b55506e |
children |
line wrap: on
line diff
--- 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 )