# HG changeset patch # User meillo@marmaro.de # Date 1278575345 -7200 # Node ID ee2afbf924289dcea0da4f92a43a0513f4fcf518 # Parent b5ab9cb2f18ae5388702bb6f3eabc10c6e176b0b 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 diff -r b5ab9cb2f18a -r ee2afbf92428 man/masqmail.conf.5 --- a/man/masqmail.conf.5 Thu Jul 08 09:43:27 2010 +0200 +++ b/man/masqmail.conf.5 Thu Jul 08 09:49:05 2010 +0200 @@ -110,6 +110,8 @@ It is not used to find whether an address is local. Use \fBlocal_hosts\fR for that. +Default: none; \fBhost_name\fP MUST be set in the config file + .TP \fBremote_port = \fIn\fR diff -r b5ab9cb2f18a -r ee2afbf92428 src/conf.c --- a/src/conf.c Thu Jul 08 09:43:27 2010 +0200 +++ b/src/conf.c Thu Jul 08 09:49:05 2010 +0200 @@ -595,6 +595,11 @@ } fclose(in); + if (!conf.host_name) { + logwrite(LOG_ALERT, "`host_name' MUST be set in masqmail.conf. See man page\n"); + return FALSE; + } + if (conf.errmsg_file == NULL) conf.errmsg_file = g_strdup(DATA_DIR "/tpl/failmsg.tpl"); if (conf.warnmsg_file == NULL)