Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYMBOLS parser is too strict #1

Open
tripleee opened this issue Apr 12, 2016 · 0 comments
Open

SYMBOLS parser is too strict #1

tripleee opened this issue Apr 12, 2016 · 0 comments

Comments

@tripleee
Copy link

I am trying to use this library against a server which supports the protocol, but returns a verdict with rather different formatting from the regular spamd. The response I need is basically JSON-like, with a number of comma-separated fields, some of them with nesting brackets etc.

The SYMBOLS parser in SpamC simply returns two of the field names, so I obtain about 16 bytes out of their context from the response which is about 250 bytes.

vnix$ spamc -p 1234 -l -y <testmessage | wc
      1      25     223

vnix$ python spamc.py testmessage
{'code': 0, 'basescore': 5.0, 'symbols': ['bw', 'rslt'], 'headers': {}, 'score': 0.0, 'report': [], 'message': 'EX_OK', 'isspam': False}

Here, the bw and rslt fragments are picked pretty much at random out of a longer string. There are many comma-separated and colon-terminated fields which are not picked up for some reason; in any event, I would like to be able to get the full raw verdict string so I can attempt to parse it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant