[erlang-questions] Communicating with SpamAssassin from Erlang

Atilla Erdődi <>
Tue Mar 8 10:39:13 CET 2011


Thanks to everybody for the advices. Finally, I've implemented a
subset of the spamd protocolon my own, it literally took several lines
of code.

Atilla

2011/3/8 Matt Stancliff <>:
>
> On Mar 7, 2011, at 3:27 AM, Atilla Erdődi wrote:
>
>> I'm trying to use SpamAssassin to check the spam score of a mail from
>> Erlang using a port.  I've experimented with several options for
>> open_port, different message formats, but haven't managed to get any
>> reply from spamc, so it times out. Apparently it doesn't notice the
>> end of the transmission. Hopefully the solution is something trivial,
>> I've missed so far.
>
>  You've run into a very common problem of erlang ports being unable to close
> stdin.
>
>> The simplified code is below:
>
>  I fixed it a few weeks ago for good:
> https://github.com/mattsta/erlang-stdinout-pool
>
>  erlang-stdinout-pool includes a port with the ability to close stdin on
> your external process and send stdout back to erlang.
>
>
> -Matt, the self proclaimed master of stdin/stdout.
> --
> Matt Stancliff                    San Jose, CA
> @mattsta                  iPhone: 678-591-9337
> "The best way to predict the future is to invent it." --Alan Kay
>
>


More information about the erlang-questions mailing list