[exim] Rspamd-Proxy error with exim

2018-06-13 Thread Emanuel Gonzalez via Exim-users
### Classification (Please choose *one* option):

* [] Crash/Hang/Data loss
* [ ] WebUI/Usability
* [ ] Serious bug
* [x] Other bug
* [ ] Feature
* [ ] Enhancement

### Reproducibility (Please choose *one* option):

* [X] Always
* [ ] Sometimes
* [ ] Rarely
* [ ] Unable
* [ ] I didn’t try
* [ ] Not applicable

### Rspamd version:

Rspamd daemon version 1.7.5

### Operation system, CPU, memory and environment:

CentOS Linux release 7.4.1708 (Core) x86_64

Cloud Hosting with 2 cores

2 Gb RAM

### Description (Please provide a descriptive summary of the issue):

rspamd-proxy doesn't work with Exim v4.87. Connection works etc but exim can't 
parse the response.

### Compile errors (if any):

### Steps to reproduce:

worker-proxy.inc

milter = no;
bind_socket = *:11332;
upstream "scan" {
default = yes; # Self-scan upstreams are always default
self_scan = yes; # Enable self-scan
hosts = "1.2.3.4:11333";
}

exim configure

spamd_address = 1.2.3.4 11332 variant=rspamd

### Expected results:

Should work via proxy.

### Actual results:

exim log:

2018-06-13 13:45:23 1fT8te-0004kn-Pw spam acl condition: cannot parse spamd 
[1.2.3.4]:11332, output: 0
2018-06-13 13:45:23 1fT8te-0004kn-Pw spam acl condition: cannot parse spamd 
[1.2.3.4]:11332, output: 0
2018-06-13 13:45:23 1fT8te-0004kn-Pw spam acl condition: cannot parse spamd 
[1.2.3.4]:11332, output: 0
2018-06-13 13:45:23 1fT8te-0004kn-Pw spam acl condition: cannot parse spamd 
[1.2.3.4]:11332, output: 0
2018-06-13 13:45:23 1fT8te-0004kn-Pw spam acl condition: cannot parse spamd 
[1.2.3.4]:11332, output: 0


### Debugging information (see details 
[here](https://rspamd.com/doc/faq.html#how-to-figure-out-why-rspamd-process-crashed)):

### Configuration:

### Additional information:

I try using this exim versions

Exim version 4.87_1 #2 built 09-Jan-2017 13:55:10

Exim version 4.90_1 #8 built 17-Apr-2018 09:43:34


More information see this report https://github.com/vstakhov/rspamd/issues/2289

[https://avatars2.githubusercontent.com/u/35730688?s=400=4]

Rspamd-Proxy error with exim · Issue #2289 · 
vstakhov/rspamd
github.com
Classification (Please choose one option): [] Crash/Hang/Data loss 
WebUI/Usability Serious bug Other bug Feature Enhancement Reproducibility 
(Please choose one option): Always Sometimes ...


-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] Rspamd-Proxy error with exim

2018-06-13 Thread Phil Pennock via Exim-users
On 2018-06-13 at 18:44 +, Emanuel Gonzalez via Exim-users wrote:
> rspamd-proxy doesn't work with Exim v4.87. Connection works etc but exim 
> can't parse the response.

Interesting.  From the rspamd log attached to your ticket against rspamd
it looks as though rspamd thinks things succeeded?

Since you have the service listening on a TCP port, could you provide a
tcpdump of the response, so we can see what text you're getting in
reply, please?

This means seeing the _actual_ reply, not just that there was a reply.

> 2018-06-13 13:45:23 1fT8te-0004kn-Pw spam acl condition: cannot parse spamd 
> [1.2.3.4]:11332, output: 0

Our code seems to match what I can figure out from the rspamd codebase,
but I've never looked at rspamd's code before so am unfamiliar with it.

The core parsing is unchanged from the logic which rspamd supplied to
us, I believe.

> More information see this report 
> https://github.com/vstakhov/rspamd/issues/2289

You include a tcpdump there showing that packets were exchanged, and
their sizes, but nothing about the content of the packets.

You'll want to tell tcpdump:  -Xs0

The "-s 0" says "read the entire packet, not just the start" and the
"-X" says to print a dump in hex and ASCII.

We only want the actual text from the reply, we don't need all the stuff
sending the mail across.  The reply probably includes the text:

   RSPAMD/1.3 0 EX_OK

That packet, to the end of the connection, is the bit we need, to
compare what the server sent with what Exim expected.

Regards,
-Phil

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/