mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-11-10 08:55:39 +08:00
a1a2082ae1
This new feature will anonymize emails in the Postfix logs. This allows you to keep them indefinetely while being compliant with GDPR. Based on excellent work on [this pull request](https://github.com/bokysan/docker-postfix/pull/91). Check `README.md` for more details.
13 lines
No EOL
409 B
Bash
Executable file
13 lines
No EOL
409 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
SCRIPT_DIR=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
|
|
##
|
|
# Email anonymizer is a filter which goes through every line reported in syslog and filters
|
|
# out email addresess.
|
|
# This ensures that python output buffering is disabled and outputs
|
|
# are sent straight to the terminal
|
|
##
|
|
while ! env PYTHONUNBUFFERED=1 python3 "$SCRIPT_DIR/email-anonymizer.py" "$@"; do
|
|
sleep 1
|
|
done |