MSGID patch

Pablo Saratxaga (srtxg@linux.chanae.stben.be)
Mon, 21 Jul 1997 20:58:16 +0200 (MET DST)

Hello,

Here is a little patch to have INN not reject messages from gigo or
fidogate nodes.

--- /root/work/ifmail-2.10/ifgate/mkrfcmsg.c Sat Apr 26 11:55:18 1997
+++ ifmail-2.10/ifgate/mkrfcmsg.c Mon Jul 21 20:24:25 1997
@@ -49,7 +49,13 @@
}
if (id != 0L)
{
- if (ta)
+ /* if we only check for (ta) a Message-ID like
+ * <123456.7890@internet.domain> will be recognized as
+ * a fidonet one (ta->node=123456, ta->point=7890,
+ * ta->domain="internet", but ta->net=0) which obviously
+ * isn't the case. By cheking also (ta->net) we avoid that
+ */
+ if ((ta) && (ta->net))
{
sprintf(buf,"<%lu@%s.ftn>",id,ascinode(ta,0x1f));
}
@@ -57,7 +63,26 @@
{
p=xstrcpy(msgid);
if ((q=strchr(p,' '))) *q='\0';
- sprintf(buf,"<%lu@%s>",id,p);
+/* ### Modified by P.Saratxaga on 18 Aug 1995 */
+ if (strstr(p,"@")) {
+ /* "mid__local@domain" are generated by gigo */
+ if (!strncmp(p,"mid__",5))
+ sprintf(buf,"<%s>",p+5);
+ /* in case we have "<local@domain>" */
+ else if (!strncmp(p,"<",1))
+ sprintf(buf,"%s",p);
+ /* or "local@domain" */
+ else sprintf(buf,"<%s>",p);
+ while ((q = strchr(buf, '@')) != strrchr(buf, '@'))
+ {
+ /* we (still) have more than one @ */
+ *q = '%';
+ }
+ }
+ else
+ {
+ sprintf(buf,"<%lu@%s>",id,p);
+ }
free(p);
}
}

-- 

A bientôt, Pablo Saratxaga

~ ~ :wq ;-) PGP Key available, key ID: 0x8F0E4975 -->