Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Unreleased]

## [0.3.1] - 2026-11-27

### Changed
- SpamBlocker files renamed to spamwall-*.gz inside the spamblocker/ folder

## [0.3.0] - 2026-11-27

### Changed
Expand Down Expand Up @@ -39,7 +44,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- One-click SpamBlocker import files and plain regex lists.
- Unblock-request and new-pattern issue templates.

[Unreleased]: https://github.com/wasimness/spamwall/compare/v0.3.0...HEAD
[Unreleased]: https://github.com/wasimness/spamwall/compare/v0.3.1...HEAD
[0.3.1]: https://github.com/wasimness/spamwall/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/wasimness/spamwall/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/wasimness/spamwall/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/wasimness/spamwall/releases/tag/v0.1.0
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,32 @@ SpamWall is an independent project, not made by or affiliated with SpamBlocker.
## Quick start (if you use SpamBlocker)

1. Export a backup first (**Settings > Backup > Export**), because an import replaces your number rules.
2. Download [`spamblocker/spamblocker-full-setup.gz`](spamblocker/spamblocker-full-setup.gz), then **Settings > Backup > Import** and pick it.
2. Download [`spamblocker/spamwall-full-setup.gz`](spamblocker/spamwall-full-setup.gz), then **Settings > Backup > Import** and pick it.
3. Follow the full guide, including the manual steps the import cannot do: [docs/IMPORT.md](docs/IMPORT.md).

## Files

| Label | File | Description | Download |
|---|---|---|---|
| Full setup (recommended) | `spamblocker-full-setup.gz` | App settings plus all spam rules in one import | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-full-setup.gz) |
| App settings only | `spamblocker-settings.gz` | Only the Others category: contacts, STIR, repeated call, dialed, answered, Recent Apps | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-settings.gz) |
| All spam rules | `spamblocker-all-rules.gz` | Allow rules plus the three default groups (not the bank group) | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-all-rules.gz) |
| Promo and telemarketing calls | `spamblocker-telemarketing.gz` | Group `telemarketing`: the 140 promotional series, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-telemarketing.gz) |
| Call-centre ranges | `spamblocker-call-centres.gz` | Group `call-centres`: call-centre landline and Bengaluru ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-call-centres.gz) |
| Spam mobile ranges | `spamblocker-spam-mobiles.gz` | Group `spam-mobiles`: bulk telemarketing mobile ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-spam-mobiles.gz) |
| Bank and government calls (optional) | `spamblocker-banks-govt.gz` | Group `banks-govt`: the official 1600 series (also blocks your real bank), plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-banks-govt.gz) |
| Raw list (CSV) | `spamwall-in.csv` | Every pattern and business number with its group, for any app or spreadsheet | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.csv) |
| Raw list (JSON) | `spamwall-in.json` | Same data with a meta object, for scripts and AI | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.json) |

Groups don't stack in SpamBlocker (each rules import replaces the number rules), so to block two groups, import `spamblocker-all-rules.gz`, or import one group and add the other patterns by hand from `rules/in/`. For all rules plus banks, import `spamblocker-all-rules.gz`, then add the IN-1600 pattern by hand.
| Full setup (recommended) | `spamblocker/spamwall-full-setup.gz` | App settings plus all spam rules in one import | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-full-setup.gz) |
| App settings only | `spamblocker/spamwall-settings.gz` | Only the Others category: contacts, STIR, repeated call, dialed, answered, Recent Apps | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-settings.gz) |
| All spam rules | `spamblocker/spamwall-all-rules.gz` | Allow rules plus the three default groups (not the bank group) | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-all-rules.gz) |
| Promo and telemarketing calls | `spamblocker/spamwall-telemarketing.gz` | Group `telemarketing`: the 140 promotional series, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-telemarketing.gz) |
| Call-centre ranges | `spamblocker/spamwall-call-centres.gz` | Group `call-centres`: call-centre landline and Bengaluru ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-call-centres.gz) |
| Spam mobile ranges | `spamblocker/spamwall-spam-mobiles.gz` | Group `spam-mobiles`: bulk telemarketing mobile ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-spam-mobiles.gz) |
| Bank and government calls (optional) | `spamblocker/spamwall-banks-govt.gz` | Group `banks-govt`: the official 1600 series (also blocks your real bank), plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-banks-govt.gz) |
| Raw list (CSV) | `raw/spamwall-in.csv` | Every pattern and business number with its group, for any app or spreadsheet | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.csv) |
| Raw list (JSON) | `raw/spamwall-in.json` | Same data with a meta object, for scripts and AI | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.json) |

Release downloads use the file name only; the folder shows where it lives in the repo.

Groups don't stack in SpamBlocker (each rules import replaces the number rules), so to block two groups, import `spamwall-all-rules.gz`, or import one group and add the other patterns by hand from `rules/in/`. For all rules plus banks, import `spamwall-all-rules.gz`, then add the IN-1600 pattern by hand.

Each `.gz` has a readable `.json` twin in `spamblocker/`. The raw list also exists as a Markdown table, [`raw/spamwall-in.md`](raw/spamwall-in.md), for reading in the repo (not a release download). Source rules: [`rules/in/`](rules/in/) (one file per pattern in `allow/`, `block/` and `optional/`, each block pattern with a `# Group:` line, plus [`allow-apps.txt`](rules/in/allow-apps.txt) and `numbers/`), table of every pattern: [`rules/in/patterns.md`](rules/in/patterns.md).

**What can be combined:** `spamblocker-settings.gz` + any ONE rules file is fine. `spamblocker-full-setup.gz` already has settings and all default rules.
**What can be combined:** `spamwall-settings.gz` + any ONE rules file is fine. `spamwall-full-setup.gz` already has settings and all default rules.

**Short version of the caveats:** settings never touch number rules; rules never touch settings. Importing `spamblocker-settings.gz` replaces your Recent Apps list and allow switches. Export a backup first, it is your undo. Not tested on every phone and SpamBlocker version, so report problems as issues. Details: [docs/IMPORT.md](docs/IMPORT.md).
**Short version of the caveats:** settings never touch number rules; rules never touch settings. Importing `spamwall-settings.gz` replaces your Recent Apps list and allow switches. Export a backup first, it is your undo. Not tested on every phone and SpamBlocker version, so report problems as issues. Details: [docs/IMPORT.md](docs/IMPORT.md).

**Releases:** download the files from the [latest release](../../releases/latest).

Expand Down Expand Up @@ -91,7 +93,7 @@ Numbers are matched without `+91` or a leading `0`.
|---|---|---|---|
| IN-1600 | `^1600\d{6}$` | Service and transactional calls from banks, insurers, brokers, mutual funds and government | This is the **official** series that regulated entities must use ([TRAI, PIB](https://pib.gov.in/PressReleasePage.aspx?PRID=2191647)). Blocking it also blocks your real bank. |

**Credit card and loan spam:** promotions must come from the 140 series, which is blocked. Official bank calls must come from 1600, which is not blocked by `spamblocker-full-setup.gz` or `spamblocker-all-rules.gz`. A loan or credit-card pitch from an ordinary mobile or landline breaks TRAI rules; report it in the **Report Spam** app (TRAI DND) and open a *New spam pattern* issue here.
**Credit card and loan spam:** promotions must come from the 140 series, which is blocked. Official bank calls must come from 1600, which is not blocked by `spamwall-full-setup.gz` or `spamwall-all-rules.gz`. A loan or credit-card pitch from an ordinary mobile or landline breaks TRAI rules; report it in the **Report Spam** app (TRAI DND) and open a *New spam pattern* issue here.

## Blocked by mistake?

Expand Down
34 changes: 18 additions & 16 deletions docs/IMPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

> **Read this first**
>
> - Settings and rules import separately. `spamblocker-settings.gz` only touches app settings (allow switches, Recent Apps) and never your number rules. `spamblocker-all-rules.gz` and the four group files (`spamblocker-telemarketing.gz`, `spamblocker-call-centres.gz`, `spamblocker-spam-mobiles.gz`, `spamblocker-banks-govt.gz`) only touch number rules. `spamblocker-full-setup.gz` does both.
> - Number-rule imports do not stack. Each import replaces ALL number rules, including your own and any earlier SpamWall import. To block two or three groups, import `spamblocker-all-rules.gz`, or import one group and add the other patterns by hand with "New" in Number Rules, copying the regex from `rules/in/block/<ID>.txt`. For all rules plus banks, import `spamblocker-all-rules.gz` and add IN-1600 (from `rules/in/optional/IN-1600.txt`) by hand.
> - Importing `spamblocker-settings.gz` replaces your Recent Apps list and the allow switches.
> - Settings and rules import separately. `spamwall-settings.gz` only touches app settings (allow switches, Recent Apps) and never your number rules. `spamwall-all-rules.gz` and the four group files (`spamwall-telemarketing.gz`, `spamwall-call-centres.gz`, `spamwall-spam-mobiles.gz`, `spamwall-banks-govt.gz`) only touch number rules. `spamwall-full-setup.gz` does both.
> - Number-rule imports do not stack. Each import replaces ALL number rules, including your own and any earlier SpamWall import. To block two or three groups, import `spamwall-all-rules.gz`, or import one group and add the other patterns by hand with "New" in Number Rules, copying the regex from `rules/in/block/<ID>.txt`. For all rules plus banks, import `spamwall-all-rules.gz` and add IN-1600 (from `rules/in/optional/IN-1600.txt`) by hand.
> - Importing `spamwall-settings.gz` replaces your Recent Apps list and the allow switches.
> - Always export a backup first; importing it again is the undo.
> - The maintainer has not tested this on every phone and SpamBlocker version. Report problems as [issues](../../issues).

Expand All @@ -16,17 +16,19 @@ SpamBlocker for Android, from [F-Droid](https://f-droid.org/packages/spam.blocke

| Label | File | Description | Download |
|---|---|---|---|
| Full setup (recommended) | `spamblocker-full-setup.gz` | App settings plus all spam rules in one import | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-full-setup.gz) |
| App settings only | `spamblocker-settings.gz` | Only the Others category: contacts, STIR, repeated call, dialed, answered, Recent Apps | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-settings.gz) |
| All spam rules | `spamblocker-all-rules.gz` | Allow rules plus the three default groups (not the bank group) | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-all-rules.gz) |
| Promo and telemarketing calls | `spamblocker-telemarketing.gz` | Group `telemarketing`: the 140 promotional series, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-telemarketing.gz) |
| Call-centre ranges | `spamblocker-call-centres.gz` | Group `call-centres`: call-centre landline and Bengaluru ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-call-centres.gz) |
| Spam mobile ranges | `spamblocker-spam-mobiles.gz` | Group `spam-mobiles`: bulk telemarketing mobile ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-spam-mobiles.gz) |
| Bank and government calls (optional) | `spamblocker-banks-govt.gz` | Group `banks-govt`: the official 1600 series (also blocks your real bank), plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamblocker-banks-govt.gz) |
| Raw list (CSV) | `spamwall-in.csv` | Every pattern and business number with its group, for any app or spreadsheet | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.csv) |
| Raw list (JSON) | `spamwall-in.json` | Same data with a meta object, for scripts and AI | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.json) |

Groups don't stack in SpamBlocker (each rules import replaces the number rules), so to block two groups, import `spamblocker-all-rules.gz`, or import one group and add the other patterns by hand from `rules/in/`. For all rules plus banks, import `spamblocker-all-rules.gz`, then add the IN-1600 pattern by hand.
| Full setup (recommended) | `spamblocker/spamwall-full-setup.gz` | App settings plus all spam rules in one import | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-full-setup.gz) |
| App settings only | `spamblocker/spamwall-settings.gz` | Only the Others category: contacts, STIR, repeated call, dialed, answered, Recent Apps | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-settings.gz) |
| All spam rules | `spamblocker/spamwall-all-rules.gz` | Allow rules plus the three default groups (not the bank group) | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-all-rules.gz) |
| Promo and telemarketing calls | `spamblocker/spamwall-telemarketing.gz` | Group `telemarketing`: the 140 promotional series, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-telemarketing.gz) |
| Call-centre ranges | `spamblocker/spamwall-call-centres.gz` | Group `call-centres`: call-centre landline and Bengaluru ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-call-centres.gz) |
| Spam mobile ranges | `spamblocker/spamwall-spam-mobiles.gz` | Group `spam-mobiles`: bulk telemarketing mobile ranges, plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-spam-mobiles.gz) |
| Bank and government calls (optional) | `spamblocker/spamwall-banks-govt.gz` | Group `banks-govt`: the official 1600 series (also blocks your real bank), plus the allow rules | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-banks-govt.gz) |
| Raw list (CSV) | `raw/spamwall-in.csv` | Every pattern and business number with its group, for any app or spreadsheet | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.csv) |
| Raw list (JSON) | `raw/spamwall-in.json` | Same data with a meta object, for scripts and AI | [Download](https://github.com/wasimness/spamwall/releases/latest/download/spamwall-in.json) |

Release downloads use the file name only; the folder shows where it lives in the repo.

Groups don't stack in SpamBlocker (each rules import replaces the number rules), so to block two groups, import `spamwall-all-rules.gz`, or import one group and add the other patterns by hand from `rules/in/`. For all rules plus banks, import `spamwall-all-rules.gz`, then add the IN-1600 pattern by hand.

Each `.gz` also has a readable `.json` twin in `spamblocker/`. The Markdown table `raw/spamwall-in.md` is for reading in the repo, not a release download. Release assets are flat, so every file name is unique.

Expand All @@ -45,12 +47,12 @@ The raw lists in `raw/` (CSV, JSON) are app-agnostic: the same rows as the SpamB
1. In SpamBlocker, open **Settings > Backup > Export** and save a backup of your current setup first.
2. Download the file you picked to your phone.
3. Open **Settings > Backup > Import** and pick the file.
4. In the **Include Settings** dialog, tap a category to move it between Include and Exclude. Keep only the category the file has (Others for `spamblocker-settings.gz`, Regex Settings for `spamblocker-all-rules.gz` and the four group files (`spamblocker-telemarketing.gz`, `spamblocker-call-centres.gz`, `spamblocker-spam-mobiles.gz`, `spamblocker-banks-govt.gz`), both for `spamblocker-full-setup.gz`).
4. In the **Include Settings** dialog, tap a category to move it between Include and Exclude. Keep only the category the file has (Others for `spamwall-settings.gz`, Regex Settings for `spamwall-all-rules.gz` and the four group files (`spamwall-telemarketing.gz`, `spamwall-call-centres.gz`, `spamwall-spam-mobiles.gz`, `spamwall-banks-govt.gz`), both for `spamwall-full-setup.gz`).
5. Confirm the import.

## Nuances

- Import REPLACES the whole section. Number rules are cleared and re-added, so importing a `spamblocker-all-rules.gz` or the four group files (`spamblocker-telemarketing.gz`, `spamblocker-call-centres.gz`, `spamblocker-spam-mobiles.gz`, `spamblocker-banks-govt.gz`) file (or `spamblocker-full-setup.gz`) deletes your own number rules. Export first, or add your own rules again afterwards.
- Import REPLACES the whole section. Number rules are cleared and re-added, so importing a `spamwall-all-rules.gz` or the four group files (`spamwall-telemarketing.gz`, `spamwall-call-centres.gz`, `spamwall-spam-mobiles.gz`, `spamwall-banks-govt.gz`) file (or `spamwall-full-setup.gz`) deletes your own number rules. Export first, or add your own rules again afterwards.
- A file that lacks a category shows "This setting is missing from the backup file and cannot be restored" for that category. Exclude it, as in step 4.
- Allow and block rules must never share a priority. Here allow is 15, the built-in allow checks are 10 and block is 5.
- Numbers are matched without +91 or a leading 0.
Expand Down
Binary file removed spamblocker/spamblocker-settings.gz
Binary file not shown.
Binary file removed spamblocker/spamblocker-spam-mobiles.gz
Binary file not shown.
Binary file removed spamblocker/spamblocker-telemarketing.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added spamblocker/spamwall-settings.gz
Binary file not shown.
Binary file added spamblocker/spamwall-spam-mobiles.gz
Binary file not shown.
Binary file added spamblocker/spamwall-telemarketing.gz
Binary file not shown.
10 changes: 5 additions & 5 deletions tools/build_spamblocker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Build the SpamBlocker import files from rules/<country>/ and write patterns.md.

Usage: python -I tools/build_spamblocker.py
Writes spamblocker/{spamblocker-full-setup,spamblocker-settings,spamblocker-all-rules,spamblocker-<group>}.{gz,json},
Writes spamblocker/{spamwall-full-setup,spamwall-settings,spamwall-all-rules,spamwall-<group>}.{gz,json},
raw/spamwall-<cc>.{csv,json,md} and rules/<cc>/patterns.md. Old spamwall-*.{gz,json} files are removed.
"""
import csv
Expand Down Expand Up @@ -99,12 +99,12 @@ def files(d):
s = settings(d)
default = group_rules(d, DEFAULT_GROUPS)
out = {
"spamblocker-full-setup": {**s, "categories": {"all": ["OTHERS", "REGEX_RULES"]}, **default},
"spamblocker-settings": s,
"spamblocker-all-rules": {"categories": {"all": ["REGEX_RULES"]}, **default},
"spamwall-full-setup": {**s, "categories": {"all": ["OTHERS", "REGEX_RULES"]}, **default},
"spamwall-settings": s,
"spamwall-all-rules": {"categories": {"all": ["REGEX_RULES"]}, **default},
}
for g in GROUPS:
out[f"spamblocker-{g}"] = {"categories": {"all": ["REGEX_RULES"]}, **group_rules(d, [g])}
out[f"spamwall-{g}"] = {"categories": {"all": ["REGEX_RULES"]}, **group_rules(d, [g])}
return out


Expand Down
Loading
Loading