opendkim
- ai opendkim opendkim-tools
- mkdir /var/spool/postfix/opendkim/
- chown opendkim /var/spool/postfix/opendkim
- usermod -aG opendkim postfix
- YEAR=$(date +'%Y')
- DOMTLD=DOM.TLD
- mkdir -p /etc/opendkim/keys/$DOMTLD
- cd /etc/opendkim/keys/$DOMTLD
- opendkim-genkey -s $YEAR -d $DOMTLD
- chown opendkim:opendkim *.private
- vim /etc/opendkim.conf
vim /etc/default/opendkim
RUNDIR=/var/spool/postfix/rumailserver D13 Trixie Debug
disable remove
ap pyzor
grep -i pyzor /etc/spamassassin/*.cf
/etc/spamassassin/v310.pre:loadplugin Mail::SpamAssassin::Plugin::Pyzor
Virtueller Mailserver
Diese Dokumentation beschreibt den vollständigen Aufbau eines virtuellen Mailservers unter Debian 13 (Trixie) mit Postfix, Dovecot, LMTP‑Zustellung, TLS‑Absicherung, Alias‑Management und einem klaren Flat‑Mailstore‑Design. Der Fokus liegt auf Stabilität, Übersichtlichkeit und Erweiterbarkeit.
🔧 1. Pakete installieren (Postfix + Dovecot)
Für einen vollständigen virtuellen Mailserver werden folgende Pakete benötigt:
spamassassin
- ai spamassassin spamd sa-compile spamass-milter re2c pyzor libmail-spamassassin-perl libarchive-zip-perl libidn2-dev libgeo-ip-perl libgeoip-dev perl-doc cpanminus libnet-libidn2-perl libencode-detect-perl libnet-patricia-perl libio-compress-perl libmail-spf-perl libio-socket-inet6-perl libdbi-perl libdbd-sqlite3-perl libwww-perl liblwp-protocol-https-perl libbsd-resource-perl libemail-address-xs-perl libmail-dmarc-perl libdevel-cycle-perl libtext-diff-perl libnet-libidn-perl libmaxmind-db-reader-perl libmaxmind-db-reader-xs-perl libdigest-sha-perl
- usermod -a -G spamass-milter
milter_mail_macros
📨 Postfix & SpamAss-Milter Integration Guide
Overview
A complete guide to integrating Postfix with SpamAss-Milter on Debian for effective spam filtering. It covers macro configuration, testing, troubleshooting, and best practices for maintaining clean, reliable mail logs.
spamass-milter
- milter_mail_macros
- vim /etc/default/spamass-milter
# spamass-milt startup defaults
# OPTIONS are passed directly to spamass-milter.
# man spamass-milter for details
# Non-standard configuration notes:
# See README.Debian if you use the -x option with sendmail
# You should not pass the -d option in OPTIONS; use SOCKET for that.
# Default, use the spamass-milter user as the default user, ignore
# messages from localhost
OPTIONS="-u spamass-milter -i 127.0.0.1"
# Reject emails with spamassassin scores &DMARC
📧 DMARC and SPF Configuration for a Centralized Mail Server
Overview
This guide outlines how to configure SPF and DMARC for multiple domains that all send mail through a single centralized mail server — mail.bubuit.net. The goal is to maintain consistent authentication across all domains, simplify future maintenance, and prevent email spoofing.
1. Central Mail Server
Hostname: mail.bubuit.net
IPv4: 116.202.112.180
opendkim.sh
vim scripts/opendkim.sh
#!/bin/bash
# Script Version: 09
# Description: Generate and install OpenDKIM keys for a given domain and append KeyTable + SigningTable entries.doveadm
doveadm is the command-line administration tool for Dovecot, used for mailbox management, full-text search, quota checking, and replication tasks.
Syntax
doveadm [global options] <command> [command options]Example:
doveadm -u user@example.com fetch -A hdr subjectGlobal Options
Option | Description |
|---|---|
DKIM, SPF und DMARC-Konfiguration für lists.bubuit.netProblemstellungE-Mails, die von sendmail_test.shpostfix dovecot sasl installai postfix postfix-pcre dovecot-core dovecot-imapd sasl2-bin libsasl2-modules 15-mailboxes.confpflogsumcrontab -e59 23 * * * /usr/sbin/pflogsumm -d today /var/log/mail.log | mail -s "pflogsum daily Report `date`" log@DOM.TLD mailmansys
apache
/etc/opendkim.conf# Log to syslog # Required to use local socket with MTAs that access the socket as a non- |