Re: [Dovecot] Another dovecot-antispam plugin can't call dspam
Hi Johannes,
From: Johannes Berg johannes@sipsolutions.net
I just committed a fix to debugv(), can you try that? If you downloaded the tarball, get this one: http://git.sipsolutions.net/?p=dovecot-antispam.git;a=snapshot;h=HEAD;sf=tgz
If you can confirm that works I'll make a new release.
The fixed version works perfectly, thank you very much!
And it prints the full command line to the syslog, I assume? Thanks for testing!
It solves the problem here as well =) Thanks for the update.
Do you plan to implement 'out of band' dspam calling? BTW maybe there is no need for a separate 'queue' folder especially as we only need a message signature. I think it can be stored in some buffer array so as the dspam calls are made i.e. during idle time (or during final cleanup at the latest).
Also I am attaching a couple of patches that might be useful. dspam-exec.c.patch adds debug-dumping of the dspam reply (it turned out quite useful not only for the stack corruption problem). Makefile.patch fixes the syntax to compile with gmake under FreeBSD 6.1 and also adjusts the installed plugin permissions.
Best wishes Eugene
Hi Eugene,
And it prints the full command line to the syslog, I assume? Thanks for testing!
It solves the problem here as well =) Thanks for the update.
Yeah, I thought so, somehow I just didn't have the idea to look at debugv() when you mentioned the problem.
Do you plan to implement 'out of band' dspam calling? BTW maybe there is no need for a separate 'queue' folder especially as we only need a message signature. I think it can be stored in some buffer array so as the dspam calls are made i.e. during idle time (or during final cleanup at the latest).
Well, I tried doing that with the signature-log backend, but that seemed somewhat problematic to me although somebody said it actually works for him.
Also I am attaching a couple of patches that might be useful. dspam-exec.c.patch adds debug-dumping of the dspam reply (it turned out quite useful not only for the stack corruption problem). Makefile.patch fixes the syntax to compile with gmake under FreeBSD 6.1 and also adjusts the installed plugin permissions.
Thanks, I've added the Makefile patch, but the other one I'm not too sure about, it seems it would print things twice if the loop actually looped, so I left it for now. Also, your code can access buf[sizeof(buf)] which would be a buffer overrun.
johannes
Hi Johannes,
From: "Johannes Berg" johannes@sipsolutions.net
Do you plan to implement 'out of band' dspam calling? BTW maybe there is no need for a separate 'queue' folder especially as we only need a message signature. I think it can be stored in some buffer array so as the dspam calls are made i.e. during idle time (or during final cleanup at the latest).
Well, I tried doing that with the signature-log backend, but that seemed somewhat problematic to me although somebody said it actually works for him.
Well, the performance of current approach seems acceptable, so it is probably not worth the trouble.
Thanks, I've added the Makefile patch, but the other one I'm not too sure about, it seems it would print things twice if the loop actually looped, so I left it for now. Also, your code can access buf[sizeof(buf)] which would be a buffer overrun.
My idea was that if the loop actually loops (i.e. more that 1024 bytes returned), we just log several lines in debug log. Sorry for buffer overrun, we have to check readsize of course. Or just pass sizeof(buf)-1 to read()
Eugene
On Tue, 2008-11-11 at 01:16 +0100, Eugene wrote:
Thanks, I've added the Makefile patch, but the other one I'm not too sure about, it seems it would print things twice if the loop actually looped, so I left it for now. Also, your code can access buf[sizeof(buf)] which would be a buffer overrun.
My idea was that if the loop actually loops (i.e. more that 1024 bytes returned), we just log several lines in debug log. Sorry for buffer overrun, we have to check readsize of course. Or just pass sizeof(buf)-1 to read()
Yeah, somehow I got confused, I've added this now.
johannes
participants (2)
-
Eugene
-
Johannes Berg