https://github.com/nigelhorne/blocking-milter
Stop Spam
https://github.com/nigelhorne/blocking-milter
milter perl spam-detection spam-filtering spam-prevention spam-protection
Last synced: 3 months ago
JSON representation
Stop Spam
- Host: GitHub
- URL: https://github.com/nigelhorne/blocking-milter
- Owner: nigelhorne
- License: gpl-2.0
- Created: 2025-01-27T15:52:33.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-02-17T13:41:30.000Z (8 months ago)
- Last Synced: 2025-03-27T20:43:15.949Z (6 months ago)
- Topics: milter, perl, spam-detection, spam-filtering, spam-prevention, spam-protection
- Language: Perl
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blocking-milter
## Overview
Sendmail filter designed to detect and reject spam emails based on specific blacklisted phrases in the email subject and body.
It integrates with Sendmail or Postfix using `Sendmail::PMilter` and logs rejected messages via syslog.
The filter allows connections from private IPs while scanning incoming emails for spam-related keywords,
rejecting those that match,
and returning a 554 5.7.1 error.## Installation
In `/etc/mail/sendmail.mc`:
INPUT_MAIL_FILTER(`blocking-milter', `S=local:/run/blocking-milter.sock, T=S:30s;R:3m')dnl
In `/etc/rc.local`:
rm -f /run/blocking-milter
/usr/local/etc/blocking-milter local:/run/blocking-milter&Or put this is in `/etc/systemd/system/blocking-milter.service`:
[Unit]
Description=Block SEO, and similar, spams
After=network.target
[Service]
ExecStart=/usr/local/etc/blocking-milter local:/run/blocking-milter
KillMode=process
Restart=on-failure[Install]
WantedBy=multi-user.targetRebuild sendmail:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart