Skip to content

Commit 72972bd

Browse files
README.md
1 parent 19d63aa commit 72972bd

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@ Automate adding domains and IP addresses to Postfix and Postgrey whitelists on M
2525

2626
## 📝 Overview
2727

28+
## Overview
29+
2830
`add_whitelists.sh` reads a simple text file (`whitelist.txt`) with one domain or IP (CIDR supported) per line, then:
2931

30-
1. Creates timestamped backups of your existing whitelist files.
31-
2. Adds entries to Postfix (`/etc/postfix/client_whitelist`) suffixed with `OK`.
32-
3. Adds domain entries to Postgrey (`/etc/postgrey/whitelist_clients.local`).
33-
4. Rebuilds the Postfix hash database and restarts both services.
32+
1. **Automatically creates missing whitelist files** if they do not exist:
33+
- `/etc/postfix/client_whitelist`
34+
- `/etc/postgrey/whitelist_clients.local`
35+
2. Creates timestamped backups of your existing whitelist files.
36+
3. Adds entries to Postfix (`/etc/postfix/client_whitelist`) suffixed with `OK`.
37+
4. Adds domain entries to Postgrey (`/etc/postgrey/whitelist_clients.local`).
38+
5. Rebuilds the Postfix hash database and restarts both services.
3439

3540
Keeping your whitelist entries in a separate file lets you safely publish this script on GitHub without exposing private data.
3641

0 commit comments

Comments
 (0)