[imapfilter-devel] IMAPFilter 1.0-beta

Lefteris Chatzibarbas lefcha at hellug.gr
Mon Apr 26 04:18:58 EEST 2004


On Sun, Apr 25, 2004 at 08:06:25PM +0200, Cedric Pradalier wrote:
> In the makefile, you have to add -I/usr/include/lua50 in the CFLAGS
> and to link with -llua50 and -llualib50 instead of -llua and -llualib.
> 
> Maybe it would be time to set up a real configure script ?

Yes, I know, I've been thinking about this, but I don't like GNU autoconf...

> I know it's a lazy question : do you have an example of the lua syntax
> to pipe a set of message resulting from a match command into an external
> program and to select a subset according to the result of the external
> program ? I'll look at lua syntax if you don't have the answer ready.

The Lua IO library has support for pipes using popen(3) and pclose(3), but
"USE_POPEN=1" should have been defined when compiling Lua (I don't know if
those Debian Lua packages have popen()/pclose() enabled).  The imapfilter+lua
packages compile Lua with popen()/pclose() enabled.  Of course you could always
use a normal file in order to emulate a bidirectional pipe...

Apart from that you should have a look at the Lua Reference Manual section 5.6
that documents all IO library functions, including the open()/close() and
read()/write() operations on file desriptors.  The Lua popen()/pclose()
functions implement the popen(3) and pclose(3) C library functions.




More information about the Imapfilter-devel mailing list