# Policy to JSON echo server

**pps** provides you with a fully functional code example in its [Github Repository](https://github.com/wneessen/postfix-policy-server). The code example is a simple "*Policy data to JSON*" echo server.&#x20;

It accepts Postifx policy requests on the default listening address (`0.0.0.0:10005`), converts the provided [PolicySet](/api/policyset.md) into JSON, outputs this JSON to `STDOUT` and replies to Postfix with a custom `INFO`response. Check out the code on [Github](https://github.com/wneessen/postfix-policy-server/blob/main/example-code/echo-server/main.go).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pps-docs.pebcak.de/code-examples/policy-to-json-echo-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
