🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #30304

Re: INN-2.1 filters

#30304
From: Andrew Gierth
Date: Thu, 06 Aug 1998 00:00
77 lines
2784 bytes
>>>>> "Jeremy" == Jeremy  <jeremy@exit109.com> writes:

 Jeremy> This is one of the things fixed in the BOFH Filter Patch from
 Jeremy> Andrew Gierth, which you'll find on my website at
 Jeremy>   http://www.exit109.com/~jeremy/news/antispam.html

WARNING: that patch is currently incompatible with actived.

(The actived patch returns the group info in a static area which is
overwritten on subsequent calls - so the group pointer saved by
ValidNewsgroups becomes invalid before being used for the mailing.
The fix is to do something like this (after applying the patch):
(this is for 1.7.2+insync)

(in ValidNewsgroups)

	case NF_FLAG_MODERATED:
	    if (!approved && !*modgroup) {
		*modgroup = COPY(gp->Name);
	    }
	    break;

(in MailArticle)

    /* Try to get the address first. */
    if ((address = GetModeratorAddress(NULL, NULL, group)) == NULL) {
	(void)sprintf(Error, "No mailing address for \"%s\" -- %s",
		group, "ask your news administrator to fix this");
	DISPOSE(group);
	return Error;
    }

    DISPOSE(group);


(in ArtPost)

#if defined(DO_PERL)
    /* Calls the Perl subroutine for headers management */
    if ((p = (char *)HandleHeaders(article)) != NULL) {
	if (idbuff) {
	    if (modgroup)
		sprintf(idbuff, "(mailed to moderator for %s)", modgroup);
	    else
		(void)strncpy(idbuff, HDR(_messageid), SMBUF - 1);
	    idbuff[SMBUF - 1] = '\0';
	}
	if (strncmp(p, "DROP", 4) == 0) {
	    syslog(L_NOTICE, "%s post %s", ClientHost, p);
	    if (modgroup)
		DISPOSE(modgroup);
	    return NULL;
	}
	else if (strncmp(p, "SPOOL", 5) == 0) {
	    syslog(L_NOTICE, "%s post %s", ClientHost, p);
	    if (modgroup)
	    {
		DISPOSE(modgroup);
		return SpoolitTo(article, p, _PATH_SPOOLNEWS "/spam/mod");
	    }
	    else
		return SpoolitTo(article, p, _PATH_SPOOLNEWS "/spam");
	}
	else
	{
	    if (modgroup)
		DISPOSE(modgroup);
	    return p;
	}
    }
#endif /* defined(DO_PERL) */


-- 
Andrew.

Technical Details
Message-ID: <87vho67nga.fsf@erlenstar.demon.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <6qa1ss$bre$1@newssvr09-int.news.prodigy.com> <6qb7o0$g0u$1@news1.exit109.com>

Show Full Headers
Complete Article Headers
Message-ID: <87vho67nga.fsf@erlenstar.demon.co.uk>
Subject: Re: INN-2.1 filters
Date: Thu, 06 Aug 1998 00:00:00 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <6qa1ss$bre$1@newssvr09-int.news.prodigy.com> <6qb7o0$g0u$1@news1.exit109.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 378407384
X-Mayan-Date: Long count = 12.19.5.7.7; tzolkin = 3 Manik; haab = 0 Yaxkin
Organization: disorganised
X-Attribution: AG
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-P-Persistent-Headers: are a bad idea.
Newsgroups: news.software.nntp