Added Spamcheck, adspam and donaspam-scritps for wh20
This commit is contained in:
@@ -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*
|
||||
@@ -0,0 +1,13 @@
|
||||
#! /usr/bin/env bash
|
||||
# Spamcheck für MS365 error-codes und Spamhaus rejections
|
||||
# Maintainer: peignerpausz
|
||||
|
||||
printf '=== %s Spamcheck === \n' "$(hostname)"
|
||||
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)
|
||||
if [ "$count" -gt 0 ]; then
|
||||
printf "|=> Anzahl %s: %s\n" "$a" "$count"
|
||||
fi
|
||||
done
|
||||
printf '=== %s Spamcheck done === \n' "$(hostname)"
|
||||
Reference in New Issue
Block a user