Added spamcheck to wh20

This commit is contained in:
Patrick Eigner-Pausz
2026-04-07 11:50:49 +02:00
parent 5ae6001157
commit e2c579e5d8
12 changed files with 2936 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
# spamcheck - schneller Spamcheck für MS365 und Spamhaus
## Funktion
Dieses Skript führt am jeweiligen Plesk-Host ein grep für geläufige MS365-Fehlercodes sowie Spamhaus auf /var/log/maillog durch und gibt die Anzahl der Treffer für dieses an.
## Voraussetzungen
- SSH-Zugriff auf den Zielserver
- Das Skript muss am Zielserver unter `$HOME/bin` oder `$HOME/spamcheck.sh` abgelegt werden.
- Das Skript muss ausführbar sein (`chmod +x spamcheck` oder `chmod +x spamcheck.sh`)
## Installation
tba.
## Verwendung
```bash
spamcheck
Anzahl S3150: 0
Anzahl S775: 0
Anzahl S7771: 0
Anzahl S7772: 0
Anzahl S7773: 0
Anzahl S7774: 0
Anzahl S7775: 0
Anzahl S7776: 0
Anzahl S7777: 0
Anzahl S7778: 0
Anzahl S7779: 0
Anzahl Spamhaus: 0
```
## Syntax
```bash
spamcheck
```
## Beispiele
```bash
# random Plesk-Server
spamcheck
```
## Troubleshooting
# zu hohe Anzahl an S3150
Prüfen durch gezieltes grep nach `S3150`, ob es sich hierbei um einen anderen String handelt. -->
```bash
sudo grep -F 'S3150' /var/log/maillog
```
---
*Maintainer: peignerpausz*
+8
View File
@@ -0,0 +1,8 @@
# /bin/bash
# Spamcheck für MS365 error-codes und Spamhaus rejections
# Maintainer: peignerpausz
for a in S3150 S775 S7771 S7772 S7773 S7774 S7775 S7776 S7777 S7778 S7779 Spamhaus
do count=$(sudo grep -c "\($a\)" /var/log/maillog 2>/dev/null)
printf "Anzahl %s: %s\n" "$a" "$count"
done