perhaps i'm missing something, but i don't understand why
imap4d sets its site the way it does. the relevant code is
so (edited for brevity):
servername = csquery("sys", sysname(), "dom");
t = getenv("site");
if(t == nil)
site = servername;
else{
n = strlen(t);
s = strchr(servername, '.');
if(s == nil)
s = servername;
else
s++;
n += strlen(s) + 2;
site = emalloc(n);
snprint(site, n, "%s.%s", t, s);
}
thus if site=coraid.com and servername gets set to
rb2.coraid.com, then site will be coraid.com.coraid.com.
this results in envelops than can be mighty screwy if
no @ appears in the from line, for example:
6 uid fetch 7 (envelope)
* 4 FETCH (UID 7 ENVELOPE ("Tue, 17 Jun 2008 19:13:44 -0400" "testing123"
(("erik quanstrom" NIL "quanstro" "coraid.com.coraid.com")) (("erik quanstrom"
NIL "quanstro" "coraid.com.coraid.com")) (("erik quanstrom" NIL "quanstro"
"coraid.com.coraid.com")) NIL NIL NIL NIL NIL))
i think it should be more like
servername = csquery("sys", sysname(), "dom");
site = getenv("site");
if(site == nil){
site = strchr(servername, '.');
if(site == nil)
site = servername;
else
site++;
}
am i missing something?
- erik