https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6939

--- Comment #38 from Karsten Bräckelmann <[email protected]> ---
(In reply to Kip from comment #36)
> > Yes, it appears to hang. It waits for input on STDIN. The message spamc is
> > supposed to pass along to spamd to check. 
> 
> How is it "supposed to pass along to spamd to check" if the socket file is
> not sane and it can already determine that before even trying to connect,
> let alone have the user or mail client wait "indefinitely"?

Spamc *could* check for a valid socket or listening process on the TCP port,
before processing STDIN at all. That it does not is pretty much desired and
documented behavior.

Spamc will not pass the message to spamd, if it exceeds a max-size threshold.
To know the message's size, spamc needs to process STDIN. See man spamc:

 -s max_size, --max-size=max_size
     Set the maximum message size which will be sent to spamd -- any
     bigger than this threshold and the message will be returned
     unprocessed (default: 500 KB).  If spamc gets handed a message
     bigger than this, it won't be passed to spamd.  The maximum message
     size is 256 MB.


(In reply to Kip from comment #37)
> It's just basic first year computer science, if even that. A program should
> check for malformed input.

$ echo -n | spamc -U ""; echo $?
74
$ echo | spamc -U ""; echo $?
69

$ man spamc | egrep '(69|74)'
           EX_UNAVAILABLE  69  service unavailable
           EX_IOERR        74  input/output error


The recent arguing and dissection of spamc behavior is outside the scope of
this report, though, and bugzilla is not an appropriate place for discussions.

Please feel free to move the more general discussion parts to the dev list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to