Never mind. The solution was staring me in the face. The --mbox filter for spamassassin allows it to handle multiple messages.
http://tmda.net/tmda-cgi/defaults.html#NoOverrideSpamCopFilter NoOverride:SpamCopFilter Optional message filter to use before reporting spam. The filter program should expect data on stdin and output to stdout. Example: [NoOverride] - SpamCopFilter = /home/user/sausr/bin/spamassassin -x -d + SpamCopFilter = /home/user/sausr/bin/spamassassin -x -d --mbox Default: None. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of David K. Thompson > Sent: Friday, October 20, 2006 8:34 AM > To: [email protected] > Subject: tmda-cgi reporter.py multiple message reporting > > > There was a modification some time ago to allow reporter.py > handle reporting > multiple messages to spamcop in a single email. > > This works well but it does break the functionality which was > added to allow > stripping of spamassassin markup from messages using the SpamCopFilter > variable. It is necessary if messages are run through spamassassin with > default safe reporting before tmda gets hold of them. > > The reason this creates a problem is that spamassassin cant > handle stripping > multiple messages at once time. > > if PVars[("NoOverride", "SpamCopFilter")]: > Filter = "%s | " % PVars[("NoOverride", "SpamCopFilter")] > else: > Filter = "" > Command = "%s%s reporter.py %s%s" % (Filter, sys.executable, Sendmail, > PVars[("General", "SpamCopAddr")]) > P = os.popen(Command, "w") > for MsgObj in MsgObjs: > P.write(MsgObj.msgobj.as_string(1)) > P.close() > > I've been looking at a workaround but I'm a little rusty. I was > thinking of > running the messages through spamassassin -d individually then > dumping them > all to reporter.py after the markup is removed; This modifies the messages > in the queue; since they are subsequently deleted anyway. > > Any better ideas? > > > > -- > > David K. Thompson > > > _________________________________________________ > tmda-workers mailing list ([email protected]) > http://tmda.net/lists/listinfo/tmda-workers > _________________________________________________ tmda-workers mailing list ([email protected]) http://tmda.net/lists/listinfo/tmda-workers
