Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


fortgeschrittene:postfix-rspamd

Dies ist eine alte Version des Dokuments!


rspamd

Doku

Voraussetzung

redis

/etc/redis/redis.conf
…
bind 127.0.0.1 ::1
…
maxmemory 500mb
…
maxmemory-policy volatile-ttl
…
systemctl restart redis.service

Installation

Paket installieren:

apt install rspamd

Übersicht Konfiguration:

rspamadm configgraph

Konfiguration ausgeben:

rspamadm configdump

Auf welchen Ports lauscht rspamd?

lsof -ac rspamd -Pni -sTCP:LISTEN

Logs:

tail /var/log/rspamd/rspamd.log

redis

rspamadm configwizard checks redis

→ erzeugt:

/etc/rspamd/local.d/redis.conf
write_servers = "localhost";
read_servers = "localhost";

Postfix

postconf -e 'smtpd_milters = inet:localhost:11332'
postconf -e 'milter_default_action = accept'

testen

Spricht postfix mit rspamd?

tcpdump -A -i lo tcp port 11332

Änderungen am Header loggen:

/etc/postfix/milter_header_checks
/(.+)/ WARN $1
postconf -e 'milter_header_checks = regexp:/etc/postfix/milter_header_checks'

Spam-Mail schicken, dann im Log schauen:

journalctl -f --facility=mail

milter-header-warning milter_header_checks in Produktion wieder aus machen:

postconf -# milter_header_checks

rspamd controller & WebUI

rspamadm configwizard checks controller

→ erzeugt: /etc/rspamd/local.d/worker-controller.inc

Zugriff auf WebUI:

ssh -L 11334:127.0.0.1:11334 admin@example.com

http://localhost:11334/

DKIM & DMARC

Doku: https://rspamd.com/doc/modules/dkim_signing.html

rspamadm configwizard checks dkim
  • Use domain from authenticated user for sign“ wählen
  • RR in bind zone eintragen
  • DMARC RR in bind zone eintragen: _dmarc.example.com TXT „v=DMARC1; p=none; rua=mailto:user1@example.com“

Konfiguration prüfen:

rspamadm configdump dkim_signing

Dienst neu laden:

systemctl reload rspamd.service

Statt dessen mit ed25519 Key

fortgeschrittene/postfix-rspamd.1723301170.txt.gz · Zuletzt geändert: 2024/08/10 14:46 von ingo_wichmann