Skip to content

Commit a8b5e8d

Browse files
README.md
1 parent 77799d8 commit a8b5e8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,28 @@ Automate adding domains and IP addresses to Postfix and Postgrey whitelists on M
2323

2424
---
2525

26+
2627
## Overview
2728
`add_whitelists.sh` is a universal script to add domains and IP addresses to Postfix and Postgrey whitelists. It supports **single-entry** and **bulk-from-file** modes. The script **auto-creates** missing files/directories, makes **timestamped backups** before changes, **ignores** blank lines and `#` comments, **deduplicates** entries, and **restarts** Postfix/Postgrey only when changes are made. At the end it prints how many entries were added and a list of what was actually added.
2829

2930
### Usage
3031

3132
**Single entry**
33+
3234
sudo ./add_whitelists.sh example.com
3335
# or
3436
sudo ./add_whitelists.sh 203.0.113.7
3537

38+
3639
**Bulk from a file**
3740

3841
1) Create a file `whitelists.txt` with one domain or IP per line (blank lines and `#` comments are ignored):
3942

4043
example.com
4144
mail.example.org
4245
192.168.1.10
46+
47+
4348

4449
2) Run:
4550

0 commit comments

Comments
 (0)