masqmail

changeset 156:ee2afbf92428

require host_name to be set in config file exit otherwise there is no portable way to determine the hostname (actually the hostname that masqmail should use) thus it must be set by the administrator
author meillo@marmaro.de
date Thu, 08 Jul 2010 09:49:05 +0200
parents b5ab9cb2f18a
children 586f001f5bbd
files man/masqmail.conf.5 src/conf.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/man/masqmail.conf.5	Thu Jul 08 09:43:27 2010 +0200
     1.2 +++ b/man/masqmail.conf.5	Thu Jul 08 09:49:05 2010 +0200
     1.3 @@ -110,6 +110,8 @@
     1.4  
     1.5  It is not used to find whether an address is local. Use \fBlocal_hosts\fR for that.
     1.6  
     1.7 +Default: none; \fBhost_name\fP MUST be set in the config file
     1.8 +
     1.9  .TP
    1.10  \fBremote_port = \fIn\fR
    1.11  
     2.1 --- a/src/conf.c	Thu Jul 08 09:43:27 2010 +0200
     2.2 +++ b/src/conf.c	Thu Jul 08 09:49:05 2010 +0200
     2.3 @@ -595,6 +595,11 @@
     2.4  	}
     2.5  	fclose(in);
     2.6  
     2.7 +	if (!conf.host_name) {
     2.8 +		logwrite(LOG_ALERT, "`host_name' MUST be set in masqmail.conf. See man page\n");
     2.9 +		return FALSE;
    2.10 +	}
    2.11 +
    2.12  	if (conf.errmsg_file == NULL)
    2.13  		conf.errmsg_file = g_strdup(DATA_DIR "/tpl/failmsg.tpl");
    2.14  	if (conf.warnmsg_file == NULL)