Created
June 27, 2024 18:55
-
-
Save ppcdias/a91aea4859714308867402e8e082ea1b to your computer and use it in GitHub Desktop.
Exim Custom Filter for Identifying Specific Words in Spam Emails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Custom Filter for Identifying Specific Words in Emails | |
# This filter blocks emails containing certain spam-related keywords. | |
# Exim filter to match specific words in the email body text | |
# (?i) makes the match case insensitive | |
if $body_text matches "(?i)Viagra|pussy|sex|sexy|****|porno|girlfriend|keylogger|Cialis|hacked|garantie|sexual|Levtira|antiviruses|bored|sexo|pornografia|hackeado" | |
then | |
# Block the email with a custom message | |
fail text "Mensagem bloqueada devido à nossa política anti-spam." | |
# Mark the message as processed and stop further filtering | |
seen finish | |
endif | |
# Instructions for customization: | |
# - Add or remove words in the pattern to adjust the filter according to your needs. | |
# - Ensure the list of words is separated by the '|' character. | |
# - Use the (?i) at the beginning of the pattern to make the match case insensitive. | |
# - Customize the fail message to provide appropriate information to the sender. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment