fix edge cases for previous commit
[infanticide.git] / README.md
1 # Infanticide
2
3 ## Disclaimer
4
5 The author of this module is militantly pro-life.  Abortion is horrible, and so are people who want to keep it legal.
6
7 ## Author
8
9 Copyright (c) 2022-2023 by Art Cancro
10
11 Use, duplication, or disclosure are subject to the terms of the GNU General Public License v3.
12
13 ## Description
14
15 `infanticide` is a SpamAssassin module that flags incoming email messages from domains that have been
16 newly registered.  The rationale behind this method is that whenever a new top level domain opens up, spammers
17 will rush to register "disposable" domains within it, sending out blasts of spam before the conventional
18 filters can catch up.  Top level domains that have particularly low registration fees, or those whose registration
19 fees are refundable within the first few days, are also prime real estate for spammers.
20
21 The filter will trigger for any sending domain that has been registered within the last 30 days.  However, a
22 quick scan of the logs shows that setting the threshold to 7 days or even 3 days would probably be equally as
23 effective.
24
25 ## How to install it
26
27 To begin, copy `infanticide.pm` to a location where `spamd` can read it.  I'm lazy so I just have the git repository
28 cloned to `/root/infanticide`.
29
30 Then insert a block such as this into `/etc/mail/spamassassin/local.cf` :
31
32 ```
33 loadplugin infanticide /root/infanticide/infanticide.pm
34 header DISPOSABLE_DOMAIN eval:check_for_disposable_domain()
35 score DISPOSABLE_DOMAIN 10.0
36 describe DISPOSABLE_DOMAIN Sender domain was recently registered and is probably disposable
37 ```
38
39 ## Troubleshooting
40
41 Read the logs and figure out what happened.
42
43 ## Support
44
45 There is no support.  I wrote this for myself and am sharing it with absolutely no support offered.  If you want
46 to supply patches, that is somewhat more welcome; send them up to the GitLab server and we'll look at them.