Mercurial > noffle
comparison src/protocol.c @ 195:76460d98b2fb noffle
[svn] * noffle.conf.example,docs/noffle.conf.5,src/configfile.h,src/configfile.c,
src/protocol.c: Add new config item 'hostname' to specify the part after
the @ in message IDs generated by Noffle. Patch submitted by Mirko Liss.
author | bears |
---|---|
date | Tue, 30 Oct 2001 13:16:40 +0000 |
parents | fed1334d766b |
children | 24d4cd032da5 |
comparison
equal
deleted
inserted
replaced
194:a4e9a20e50e5 | 195:76460d98b2fb |
---|---|
1 /* | 1 /* |
2 protocol.c | 2 protocol.c |
3 | 3 |
4 $Id: protocol.c 300 2001-08-05 08:24:22Z bears $ | 4 $Id: protocol.c 314 2001-10-30 13:16:40Z bears $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
239 getDomain( Str domain, const char *from ) | 239 getDomain( Str domain, const char *from ) |
240 { | 240 { |
241 const char *addTopLevel, *p1, *p2, *p, *domainStart; | 241 const char *addTopLevel, *p1, *p2, *p, *domainStart; |
242 Str myDomain; | 242 Str myDomain; |
243 | 243 |
244 if ( getFQDN( myDomain ) ) | 244 /* get hostname for MsgId from Cfg-File */ |
245 /* more elaborate testing must be left to upstream server */ | |
246 Utl_cpyStr( myDomain, Cfg_hostnameMsgId() ); | |
247 if ( strlen( myDomain ) != 0 || getFQDN( myDomain ) ) | |
245 { | 248 { |
246 p = strstr( myDomain, "." ); | 249 p = strstr( myDomain, "." ); |
247 if ( p != NULL ) | 250 if ( p != NULL ) |
248 domainStart = p + 1; | 251 domainStart = p + 1; |
249 else | 252 else |