Update README.md

This commit is contained in:
lolcat 2025-07-14 15:04:29 +00:00
parent c993c509da
commit 2f966d5355
1 changed files with 31 additions and 7 deletions

View File

@ -62,7 +62,7 @@ If it asks for a distance/priority parameter, input `10`.
## Step 2 ## Step 2
Go to your host's server configuration panel and set the rDNS (Reverse DNS) to `mail.yourdomain.com` (obviously, replace `yourdomain.com` with your own). This helps some exotic mail servers to perceive your E-Mails as not spam. After setting up the rDNS, restart the server and run this from your local machine: Go to your host's server configuration panel and set the rDNS (Reverse DNS) to `mail.yourdomain.com` (obviously, replace `yourdomain.com` with your own). This helps some exotic mail servers to perceive your E-Mails as not spam. After setting up the rDNS, restart the server and run this from your local machine:
``` ```sh
will@fuckedmachine:~$ ping yourdomain.com will@fuckedmachine:~$ ping yourdomain.com
PING yourdomain.com (x.x.x.x) 56(84) bytes of data. PING yourdomain.com (x.x.x.x) 56(84) bytes of data.
64 bytes from mail.yourdomain.com (x.x.x.x): icmp_seq=1 ttl=52 time=13.4 ms 64 bytes from mail.yourdomain.com (x.x.x.x): icmp_seq=1 ttl=52 time=13.4 ms
@ -76,26 +76,26 @@ The 3rd line is the interesting part. It should say `64 bytes from mail.yourdoma
## Step 3 ## Step 3
SSH onto your shitbox and become root SSH onto your shitbox and become root
``` ```sh
sudo su sudo su
``` ```
## Step 4 ## Step 4
Create your mail user. Note that all users with the `mail` group will be able to send and receive mail. Create your mail user. Note that all users with the `mail` group will be able to send and receive mail.
``` ```sh
useradd -m yourname -G mail useradd -m yourname -G mail
passwd yourname passwd yourname
``` ```
OR... If you already have an user that you use (say, `will`), do this instead: OR... If you already have an user that you use (say, `will`), do this instead:
``` ```sh
usermod -aG mail will usermod -aG mail will
``` ```
`-aG` tells your stupid server "hey, `mail` is a secondary group for `will`!" `-G` says it's the primary group. `-aG` tells your stupid server "hey, `mail` is a secondary group for `will`!" `-G` says it's the primary group.
## Step 5 ## Step 5
Run these commands (don't run `bullmail.sh` quite yet you moron) Run these commands (don't run `bullmail.sh` quite yet you moron)
``` ```sh
git clone https://git.lolcat.ca/lolcat/bullmail git clone https://git.lolcat.ca/lolcat/bullmail
cd bullmail/script cd bullmail/script
chmod +x bullmail.sh chmod +x bullmail.sh
@ -103,7 +103,7 @@ chmod +x bullmail.sh
## Step 6 ## Step 6
Edit `bullmail.sh` and change the variables at the top to what matches your configuration. In my case, this is what I used: Edit `bullmail.sh` and change the variables at the top to what matches your configuration. In my case, this is what I used:
``` ```ini
# #
# Input your settings here # Input your settings here
# #
@ -119,7 +119,7 @@ I know this is not the first time you're trying to install a mail server. Make s
## Step 8 ## Step 8
Run the script. Make sure you're root and inside the `script` folder Run the script. Make sure you're root and inside the `script` folder
``` ```sh
./bullmail.sh ./bullmail.sh
``` ```
@ -179,6 +179,30 @@ Content-Transfer-Encoding: 7bit
test test
``` ```
# Additional configuration
`rspamd` is your spam filter. You can tweak it manually to instruct it to block specific E-Mails, depending of your situation. For example, this is what I currently use to block incessant phishing E-Mails:
File `/etc/rspamd/local.d/rules.local`
```cf
local_rules = {
from_mismatch = {
expression = "!(from:domain == smtp_from:domain)",
score = 5,
description = "From domain doesn't match SMTP envelope"
},
replyto_mismatch = {
expression = "replyto && !(replyto:domain == from:domain)",
score = 5,
description = "Reply-To domain doesn't match From domain"
},
forged_own_domain_fail_auth = {
expression = "(from:domain == 'lolcat.ca') && !(R_DKIM_ALLOW || R_SPF_ALLOW || DMARC_POLICY_ALLOW)",
score = 6.0,
description = "Email claims to be from our domain but is not properly authenticated"
}
}
```
# Screenshots # Screenshots
## Inbox ## Inbox
![Inbox screenshot](img/inbox.png) ![Inbox screenshot](img/inbox.png)