strcat(rcfile, RCFILE_NAME);
}
-char *host_fqdn(void)
+char *host_fqdn(int required /** barf if the name cannot be resolved */)
/* get the FQDN of the machine we're running */
{
char tmpbuf[HOSTLEN+1];
fprintf(stderr,
GT_("gethostbyname failed for %s\n"), tmpbuf);
fprintf(stderr, "%s", gai_strerror(e));
- exit(PS_DNS);
+ fprintf(stderr, GT_("Cannot find my own host in hosts database to qualify it!\n"));
+ if (required)
+ exit(PS_DNS);
+ else {
+ fprintf(stderr, GT_("Trying to continue with unqualified hostname.\nDO NOT report broken Received: headers, HELO/EHLO lines or similar problems!\nDO repair your /etc/hosts, DNS, NIS or LDAP instead.\n"));
+ return 0;
+ }
}
result = xstrdup(res->ai_canonname);
const char *showproto(int);
void dump_config(struct runctl *runp, struct query *querylist);
int is_host_alias(const char *, struct query *);
-char *host_fqdn(void);
+char *host_fqdn(int required);
char *rfc822timestamp(void);
flag is_a_file(int);
char *rfc2047e(const char*, const char *);