[Dovecot] plugin problem

Timo Sirainen tss at iki.fi
Sun Sep 30 13:48:53 EEST 2007


On Sun, 2007-09-30 at 09:30 +0200, Lars Stavholm wrote:
> Another (mildly stupid maybe) question: why the fork()
> in the original dspam plugin? Seems to me that the fork()
> + waitpid() doesn't really allow for any advantage over
> a simple popen() and read the output? I have a sneaky
> feeling that I'm missing something vital here.

popen() uses FILE streams, which I at least try to avoid. For example in
some systems (Solaris IIRC) they were limited to 256 first file
descriptors.

It also executes everything through /bin/sh -c, which is pointless if
you're not running a script and possibly dangerous if you're not
escaping parameters correctly.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070930/f3c0ff63/attachment.bin 


More information about the dovecot mailing list