Friends,
There is this function qmesearch() in qmail-local.c. There is a portion of
the code which sets the environment variable DEFAULT. I presume that this
variable is being set for the program fastforward. What I don't
understand is that if a mail sent to user-anythingdefault and the
file .qmail-anythingdefault exists in ~user the environment
variable DEFAULT is set to "default" by qmail-local
Any idea why this is being done?
void qmesearch(fd,cutable)
int *fd;
int *cutable;
{
int i;
if (!stralloc_copys(&qme,".qmail")) temp_nomem();
if (!stralloc_cats(&qme,dash)) temp_nomem();
if (!stralloc_cat(&qme,&safeext)) temp_nomem();
if (qmeexists(fd,cutable)) {
/*-- THIS IS WHAT I want to understand */
if (safeext.len >= 7) {
i = safeext.len - 7;
if (!byte_diff("default",7,safeext.s + i))
if (i <= str_len(ext)) /* paranoia */
if (!env_put2("DEFAULT",ext + i)) temp_nomem();
}
return;
}
for (i = safeext.len;i >= 0;--i)
if (!i || (safeext.s[i - 1] == '-')) {
if (!stralloc_copys(&qme,".qmail")) temp_nomem();
if (!stralloc_cats(&qme,dash)) temp_nomem();
if (!stralloc_catb(&qme,safeext.s,i)) temp_nomem();
if (!stralloc_cats(&qme,"default")) temp_nomem();
if (qmeexists(fd,cutable)) {
if (i <= str_len(ext)) /* paranoia */
if (!env_put2("DEFAULT",ext + i)) temp_nomem();
return;
}
}
*fd = -1;
}
--
Regards Manvendra - http://www.indimail.org
GPG Pub Key
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC7CBC760014D250C
There is this function qmesearch() in qmail-local.c. There is a portion of
the code which sets the environment variable DEFAULT. I presume that this
variable is being set for the program fastforward. What I don't
understand is that if a mail sent to user-anythingdefault and the
file .qmail-anythingdefault exists in ~user the environment
variable DEFAULT is set to "default" by qmail-local
Any idea why this is being done?
void qmesearch(fd,cutable)
int *fd;
int *cutable;
{
int i;
if (!stralloc_copys(&qme,".qmail")) temp_nomem();
if (!stralloc_cats(&qme,dash)) temp_nomem();
if (!stralloc_cat(&qme,&safeext)) temp_nomem();
if (qmeexists(fd,cutable)) {
/*-- THIS IS WHAT I want to understand */
if (safeext.len >= 7) {
i = safeext.len - 7;
if (!byte_diff("default",7,safeext.s + i))
if (i <= str_len(ext)) /* paranoia */
if (!env_put2("DEFAULT",ext + i)) temp_nomem();
}
return;
}
for (i = safeext.len;i >= 0;--i)
if (!i || (safeext.s[i - 1] == '-')) {
if (!stralloc_copys(&qme,".qmail")) temp_nomem();
if (!stralloc_cats(&qme,dash)) temp_nomem();
if (!stralloc_catb(&qme,safeext.s,i)) temp_nomem();
if (!stralloc_cats(&qme,"default")) temp_nomem();
if (qmeexists(fd,cutable)) {
if (i <= str_len(ext)) /* paranoia */
if (!env_put2("DEFAULT",ext + i)) temp_nomem();
return;
}
}
*fd = -1;
}
--
Regards Manvendra - http://www.indimail.org
GPG Pub Key
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC7CBC760014D250C