Commit 1f3e4b96 authored by Christian Roessner's avatar Christian Roessner
Browse files

[Minor] Add doc and systemd unit file

parent 0862155e
# encchecker
## About
Postfix-Submission Milter that detects illegal UTF-8 encoded headers (headers have to be 7bit only)
Postfix has a built-in feature named "strict_7bit_headers", but it does not have a "warn/log-only" feature. If you want to
investigate how many and which mails would be affected by "strict_7bit_headers = yes", you can run `encchecker` in "logonly" mode.
## Features
* Checks each header of an email for invalid 8bit characters
* Can be run in "reject" or "logonly" mode
# Table of contents
1. [Install](#install)
* [Postfix integration](#postfix-integration)
* [Preparing a docker image](#preparing-a-docker-image)
* [Build from source](#build-from-source)
* [Server options](#server-options)
# Install
## Postfix integration
The service is configured in Postfix like this...
smtpd_milters={ inet:, connect_timeout=10s, command_timeout=10s, content_timeout=10s, default_action=accept }
... if you use the docker-compose.yml file as provided.
Back to [table of contents](#table-of-contents)
## Preparing a docker image
The simplest way to use the program is by using a docker image.
cd /path/to/Dockerfile
docker build -t encchecker:latest .
Back to [table of contents](#table-of-contents)
## Build from source
### Requirements
To build ratelimit from source, you need at least Golang version 1.16 or above.
### Compile
cd /path/to/sourcecode
go mod tidy
go build -o encchecker .
You can find an example systemd unit file in the contrib folder.
Back to [table of contents](#table-of-contents)
## Server options
/usr/local/bin/encchecker --help
produces the following output:
Usage of /usr/local/bin/encchecker:
-addr string
Bind to address or unix domain socket (default "")
Only log results without rejecting emails
-proto string
Protocol family (unix or tcp) (default "tcp")
-reply string
Custom response message (default "554 5.6.0 Message blocked due to illegal UTF-8 header encoding")
Enable verbose output
Back to [table of contents](#table-of-contents)
Hope you enjoy :-)
\ No newline at end of file
Description=Postfix Milter to check for broken UTF8-characters in header fields
ExecStart=/usr/local/bin/encchecker -verbose -logonly
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment