Created
May 12, 2013 05:28
-
-
Save kylemanna/5562526 to your computer and use it in GitHub Desktop.
Test using LUA + LUA Process Call (lua-lpc) + spamassassin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env lua | |
| require("lpc") | |
| --[[ | |
| local f = io.open("spam1.txt", "rb") | |
| local content = f:read("*all") | |
| f:close() | |
| ]]-- | |
| local content = io.stdin:read("*all") | |
| --local pid, w, r = lpc.run("spamassassin") | |
| local pid, w, r = lpc.run("spamc") | |
| io.stderr:write("writing to pid " .. pid .. "...\n") | |
| w:write(content) | |
| w:close() | |
| io.stderr:write("waiting for spamassasin...\n") | |
| print (r:read("*all")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment