INN with non-email IDs in "From:"?
Julien ÉLIE
julien at trigofacile.com
Thu Jul 28 20:21:00 UTC 2016
Hi DataPacRat,
> I'm gradually putting together the outline for a comm project, in
> which I hope some version of INN will be the main component. There is,
> however, one item on the "wish list" section of the project's goals
> that I don't know how to approach: Modifying INN's source code so that
> the "From:" header doesn't have to be an email address, but could be a
> Twitter @handle, or a Ricochet address (eg,
> ricochet:rs7ce36jsj24ogfw), or an URL pointing to a FaceBook profile
> or a vCard, or anything of the sort. (If the From: header could be
> expanded to accept URIs, instead of arbitrary text-strings, that would
> work well enough for this project.)
> [...]
> I'm hoping someone here might
> know enough to tell me "Just edit file X line Y and comment out the
> 'email check' call", or at least point me in the right direction.
>
> So - can you help me with this?
I believe you could just edit file nnrpd/post.c and comment out
the following snippet:
strlcpy(frombuf, HDR(HDR__FROM), sizeof(frombuf));
/* Unfold the From: header field. */
for (p = frombuf; p < frombuf + sizeof(frombuf); )
if ((p = strchr(p, '\n')) == NULL)
break;
else
*p++ = ' ';
/* Try to rewrite the From: header field in a cleaner format. */
HeaderCleanFrom(frombuf);
/* Now perform basic checks of the From: header field.
* Pass leading '@' chars because they are not part of an address. */
p = frombuf;
while (*p == '@') {
p++;
}
p = strchr(p, '@');
if (p != NULL) {
p = strrchr(p+1, '.');
if (p == NULL) {
if (modgroup)
free(modgroup);
return "From: address not in Internet syntax";
}
} else {
if (modgroup)
free(modgroup);
return "From: address not in Internet syntax";
}
I don't see other checks in innd/art.c about the From: header field,
so the post should be accepted.
--
Julien ÉLIE
« Le chemin le plus court d'un point à un autre est la ligne droite,
à condition que les deux points soient bien en face l'un de
l'autre. » (Pierre Dac)
More information about the inn-workers
mailing list