diff for ^aDOMAIN problem

Pablo Saratxaga (srtxg@linux.chanae.stben.be)
Wed, 21 May 1997 02:01:00 +0200 (MET DST)

Hello,

When I received netmail from Hungary and Germany ifmail paniqued, as
those messages had a ^aDOMAIN: line that doesn't follow fts-0038.
Indeed fidogate generates a DOMAIN: kludge line but like this:

("^aDOMAIN: Z%d@%s",zone,domain) (in pseudo C notation ;-) )

that little patch solved the problem :

--- work/ifmail-2.10/ifgate/mkrfcmsg.c Sat Apr 26 11:55:18 1997
+++ mkrfcmsg.c Wed May 21 01:57:12 1997
@@ -177,7 +177,17 @@
else newsmode=0;
debug(5,"Got %s message",newsmode?"echo":"netmail");

- if ((p=hdr("DOMAIN",kmsg)))
+ /* fidogate generates "^aDOMAIN: Z2@fidonet" */
+ if ((p=hdr("DOMAIN",kmsg)) && (q=strchr(p,'@')))
+ {
+ *q='\0';
+ f->zone=atoi(p+1);
+ f->domain=xstrcpy(q+1);
+ *q='@';
+ }
+
+ /* fsc-0038 defines "^aDOMAIN: othernet 99:12/34 fidonet 2:293/2219" */
+ if ((p=hdr("DOMAIN",kmsg)) && (!strchr(p,'@')))
{
strncpy(buf,p,sizeof(buf)-1);
buf[sizeof(buf)-1]='\0';

-- 

A bientôt, Pablo Saratxaga

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