puzzle-pieceHeader/Footer Keyword Filter

Overview

Header/Footer Keyword Filter lets you forward or block messages based on keywords found at the beginning (header) or end (footer) of messages. This is perfect for filtering spam signatures, forwarding only priority messages, or blocking content from specific sources.

What It Does

  • Header filtering: Check first few lines of message for keywords

  • Footer filtering: Check last few lines of message for keywords

  • Blacklist mode: Block messages containing specific keywords

  • Whitelist mode: Only forward messages containing specific keywords

  • Regex support: Use advanced patterns for complex matching

  • Case options: Case-sensitive or case-insensitive matching

Key Benefits

βœ… Block spam signatures - Filter out messages with known spam footers βœ… Priority forwarding - Only forward messages with specific headers ("URGENT:", "PREMIUM:") βœ… Source filtering - Block/allow based on source signatures in footers βœ… Pattern matching - Use regex for flexible filtering rules βœ… Separate control - Different rules for headers vs footers βœ… Flexible logic - Blacklist to block, whitelist to allow only


Getting Started

Prerequisites

  1. βœ… Purchase Header/Footer Keyword Filter addon

  2. βœ… Have an active forwarding task

  3. βœ… Know what keywords/patterns you want to filter

Quick Setup

Step 1: Purchase & Enable

  1. Menu β†’ My Addons β†’ Header/Footer Keyword Filter β†’ Unlock

  2. Open your task settings

  3. Find Header/Footer Filter section

  4. Configure your filtering rules

Step 2: Choose Header or Footer

Header Filter: Scans the first 2-3 lines of message Footer Filter: Scans the last 2-3 lines of message

Or use both for comprehensive filtering.

Step 3: Choose Blacklist or Whitelist

Blacklist (Block Mode):

  • Enter keywords to BLOCK

  • Messages containing these keywords will NOT be forwarded

  • Use when you know what to block

Whitelist (Allow-Only Mode):

  • Enter keywords to ALLOW

  • ONLY messages containing these keywords will be forwarded

  • Use when you know what to forward

Step 4: Enter Keywords

Enter one keyword per line:

Or use regex for advanced patterns (enable "Use Regex" option):

Step 5: Configure Options

Use Regex: ON/OFF

  • OFF: Plain text matching (simpler, faster)

  • ON: Regex pattern matching (flexible, powerful)

Ignore Case: ON/OFF

  • ON: "SPAM" matches "spam", "Spam", "SPAM"

  • OFF: Must match exact case


Configuration Details

Header (beginning of message):

  • First 2-3 lines

  • Typically contains: titles, labels, priorities, source identifiers

  • Examples:

    • "🚨 URGENT SIGNAL"

    • "Premium Members Only"

    • "[Verified Source]"

Footer (end of message):

  • Last 2-3 lines

  • Typically contains: signatures, credits, promotional links, channel tags

  • Examples:

    • "Join @ChannelName for more"

    • "Powered by XYZ"

    • "πŸ‘‰ https://promo-link.com"

Lines considered: ~2-3 lines (implementation may vary), enough to catch typical headers/footers.

Blacklist Mode (Block)

How it works:

  1. Check if header/footer contains any blacklisted keyword

  2. If YES β†’ Block (don't forward)

  3. If NO β†’ Forward normally

When to use:

  • Block spam patterns: "Join our channel", "Free premium"

  • Block specific sources: "[SourceName]", "via @SpamChannel"

  • Block promotional content: "discount", "click here", urls

Example - Block spam footers:

Result: Any message ending with these patterns is blocked.

Whitelist Mode (Allow-Only)

How it works:

  1. Check if header/footer contains any whitelisted keyword

  2. If YES β†’ Forward

  3. If NO β†’ Block (don't forward)

When to use:

  • Forward only priority: "URGENT", "PREMIUM", "VIP"

  • Forward only verified sources: "[Verified]", "Official"

  • Forward only specific categories: "NEWS", "ANALYSIS"

Example - Only forward premium signals:

Result: Only messages starting with these keywords are forwarded.

You can use both simultaneously:

Example - Premium signals without spam:

Result: Forward only messages with premium headers AND without spam footers.

Logic: ALL conditions must be met:

  • Header must match whitelist (if configured)

  • Footer must match whitelist (if configured)

  • Header must NOT match blacklist (if configured)

  • Footer must NOT match blacklist (if configured)

Plain Text vs Regex

Plain Text Matching (Regex OFF):

  • Simple substring search

  • "spam" matches "This is spam message"

  • Fast, easy to configure

  • Recommended for simple keywords

Regex Matching (Regex ON):

  • Advanced pattern matching

  • promo.*discount matches "promo code discount", "promotional discount"

  • \d{10,} matches any 10+ digit number

  • http[s]?:// matches URLs

  • Flexible but complex

  • Recommended for advanced users

Common regex patterns:

Case Sensitivity

Ignore Case ON (recommended):

  • "SPAM" matches "spam", "Spam", "SPAM", "SpAm"

  • Easier to configure

  • Catches more variations

Ignore Case OFF:

  • "SPAM" only matches "SPAM"

  • Useful for exact matching

  • Stricter filtering


Common Use Cases

Block Spam Signatures

Scenario: Source channels add promotional links at the end of every message.

Setup:

Result: Messages with these spam signatures in footer are blocked.


Forward Only Premium Signals

Scenario: Mixed channel with free and premium content, only want premium.

Setup:

Result: Only messages starting with premium indicators are forwarded.


Filter by Source Identifier

Scenario: Aggregator channel mixes multiple sources, only want specific ones.

Setup (allow specific sources):

Setup (block specific sources):

Result: Control which sources get forwarded based on footer tags.


Block URL Spam (Regex)

Scenario: Block messages with shortened URLs in footer.

Setup:

Result: Messages with these URL patterns in footer are blocked.


Priority-Only Forwarding

Scenario: Forward only urgent/important messages from busy source.

Setup:

Result: Only messages marked as priority are forwarded, noise is filtered.


Troubleshooting

Issue: Not Blocking Expected Messages

Check:

Test: Use very simple keyword you know exists (e.g., "test") to verify filtering works.


Issue: Blocking Too Many Messages

Problem: Whitelist is too strict, most messages blocked.

Solutions:

  • Add more whitelist keywords

  • Switch to blacklist mode (block only known bad patterns)

  • Use regex for flexible matching (e.g., .*premium.* to catch variations)

  • Check if keywords really appear in header/footer (not in middle of message)


Issue: Regex Not Working

Check:

Common mistakes:

  • Forgetting to escape special chars: http:// should be http[s]?://

  • Regex too broad: .* matches everything

  • Regex too specific: won't catch variations

Test regex: Use online tools like regex101.com before adding to addon.


Problem: Need different rules for header vs footer but keyword appears in both.

Solution:

  • Use more specific keywords/patterns

  • Add context: "Footer: keyword" vs just "keyword"

  • Use regex anchors: ^keyword (start), keyword$ (end)

  • Combine with other filters (content filter, sender filter)


Header: Approximately first 2-3 lines of message Footer: Approximately last 2-3 lines of message

Tips:

  • Single-line messages: Entire message is both header and footer

  • Long messages: Only edges are checked, middle is ignored

  • Media captions: Caption text is checked (if present)

Test: Forward sample messages and check which get through to understand line boundaries.


Best Practices

Start with Blacklist Mode

Easier to start with:

  1. Forward everything initially

  2. Notice spam patterns in footer

  3. Add to blacklist incrementally

  4. Monitor and adjust

Whitelist mode requires knowing ALL valid patterns upfront (harder).

Use Plain Text First

  • Start with simple keyword lists

  • Only use regex if plain text doesn't work

  • Regex is powerful but complex and error-prone

Ignore Case by Default

Unless you have specific reason:

  • Turn "Ignore Case" ON

  • Catches more variations

  • Easier to configure

One Keyword Per Line

Format:

NOT:

Test with Known Messages

Before going live:

  1. Find sample messages you want to block/allow

  2. Configure filter

  3. Test with those specific messages

  4. Adjust until correct

Combine with Other Filters

Header/Footer filter works best with:

  • Keyword filter: Filter message body content

  • Sender filter: Filter by source channel

  • Media filter: Filter by media type Together = comprehensive filtering

Document Your Rules

Keep notes on why each keyword was added:

  • "Join @" - blocks spam channel promotions

  • "PREMIUM" - whitelist for paid signals Helps when revisiting settings months later.


Frequently Asked Questions

Header: First ~2-3 lines of message text Footer: Last ~2-3 lines of message text

Exact line count may vary by implementation. For single-line messages, the entire message is both header and footer.

Does it check media captions?

Yes, if message has media with caption, the caption text is checked for header/footer keywords.

Can I use multiple keywords?

Yes, enter one keyword per line. If ANY keyword matches, the rule triggers.

Does it work with forwarded message credits?

Depends. If forwarded message retains source credit as text (e.g., "Forwarded from ChannelName"), that text may be part of header/footer. Test to verify.

Blacklist vs whitelist - which is better?

Blacklist (block mode):

  • Better when you know what to block

  • Easier to start with

  • Forwards everything except blacklist

Whitelist (allow-only mode):

  • Better when you know exactly what to forward

  • More restrictive

  • Blocks everything except whitelist

Recommend: Start with blacklist, switch to whitelist if you have clear "allow only" criteria.

Can I use both blacklist and whitelist?

Yes, both header and footer can have separate blacklist and whitelist rules. All conditions must be met for message to forward.

Does order of keywords matter?

No, all keywords are checked equally. First match triggers the rule.

How do I match exact phrases?

Plain text mode: Enter the exact phrase, enable "Ignore Case" if needed

Regex mode: Use word boundaries for exact match

Can it filter emojis?

Yes, emojis are treated as text. Copy-paste the emoji into keyword field:

Does it slow down forwarding?

Minimal impact. Header/footer checking is very fast since only edges of message are scanned (not full message body).


Performance Tips

Keep Keyword Lists Short

  • 5-10 keywords per list is ideal

  • 20+ keywords may slow down processing

  • Use regex to consolidate similar patterns

Use Specific Keywords

More specific = fewer false positives:

  • βœ… "Join @ChannelName for exclusive"

  • ❌ "join" (too broad, matches "join the discussion")

Combine with Sender Filter

Don't rely on header/footer filter alone:

  • Filter by sender first (faster)

  • Then apply header/footer filter (precise)

Test Regex Performance

Complex regex can be slow:

  • Test with online regex tools

  • Avoid catastrophic backtracking patterns (e.g., (.*)*)

  • Keep patterns simple


Getting Help

If header/footer filtering isn't working as expected:

  1. Verify addon is active and enabled in task

  2. Check your keywords actually appear in header/footer (not middle of message)

  3. Test with very simple keyword you know exists

  4. Review blacklist vs whitelist logic

  5. Check Addons FAQ

  6. Contact support with:

    • Your filter configuration (keywords, regex, options)

    • Sample message that should be filtered but isn't (or vice versa)

    • Expected vs actual behavior

Support: Menu β†’ Help & Support or [email protected]


Summary

Header/Footer Keyword Filter provides precision filtering based on message edges:

βœ… Block spam - Filter out promotional footers and signatures βœ… Priority forwarding - Only forward messages with specific headers βœ… Source control - Filter by source tags in headers/footers βœ… Flexible matching - Plain text or regex patterns βœ… Dual modes - Blacklist to block, whitelist to allow βœ… Case options - Case-sensitive or insensitive matching

Perfect for: Spam filtering, priority message forwarding, source-based filtering, signature detection, promotional content blocking.

Quick start:

  1. Enable addon in task

  2. Decide header or footer filtering

  3. Choose blacklist (block) or whitelist (allow-only)

  4. Enter keywords (one per line)

  5. Enable "Ignore Case"

  6. Keep regex OFF (unless needed)

  7. Test and refine


Last Updated: March 2026 Addon Version: 1.0 App Version: 1.0.44+

Last updated