Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Apr 2004
    Location
    São Paulo - Brasil
    Posts
    22

    Post Email filter to block messages with "re [##]" subject

    Hi guys,

    I was receiving spam with subjects like re[34], Re [45]:, etc... that spam assassin didn't catch...

    well, the solution: filter with regex.

    just set a filter in CPanel where the 'Subject' 'matches regex' and put "\\N^((?i)re)(\\s|)+\\[([0-9])+\\](:|)$\\N" (without quotes) in the input box...

    It will match: re[12], RE [3], Re [43]:, Re[55]:, and variations...

    Have a nice filtering!

    If anyone wants to understand the regex, please ask me...

    Marcel Touma

  2. #2
    Member
    Join Date
    Jan 2004
    Posts
    84

    Default

    Quote Originally Posted by touma
    Hi guys,

    I was receiving spam with subjects like re[34], Re [45]:, etc... that spam assassin didn't catch...

    well, the solution: filter with regex.

    just set a filter in CPanel where the 'Subject' 'matches regex' and put "\\N^((?i)re)(\\s|)+\\[([0-9])+\\](:|)$\\N" (without quotes) in the input box...

    It will match: re[12], RE [3], Re [43]:, Re[55]:, and variations...

    Have a nice filtering!

    If anyone wants to understand the regex, please ask me...

    Marcel Touma
    Hello Marcel,

    Greatz post! Perfect filter. Do you have others filters do send me?

    Regards,
    Minotauro.

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    São Paulo - Brasil
    Posts
    22

    Default

    Hi Minotauro, thanks!

    I don't have other filters yet... but every time I create one, I will post it here...


    Regards,
    Marcel Touma
    Last edited by touma; 08-05-2005 at 02:49 PM.

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    154

    Default

    Is there a way to set this up in Exim.conf file ?
    And, do you have any idea how to setup your own dns blacklist ?
    Ref http://forums.cpanel.net/showthread....ght=blackholes

  5. #5
    Member
    Join Date
    Oct 2001
    Posts
    154

    Default

    Is there a way to set this up in Exim.conf file ?

    Anyone ?

  6. #6
    Member
    Join Date
    Jan 2004
    Posts
    84

    Default

    Quote Originally Posted by Bruce
    Is there a way to set this up in Exim.conf file ?

    Anyone ?
    Hello Bruce,

    You need open a /etc/antivirus.exim and put:

    if
    $header_subject: matches "\\N^((?i)re)(\\s|)+\\[([0-9])+\\](:|)\$\\N"
    then
    seen finish
    endif

    I already test and work fine! Thanks Touma.

    Regards,
    Minotauro.

  7. #7
    Member
    Join Date
    Oct 2001
    Posts
    154

    Default

    THANKS minotauro
    Works like a charm !
    Any idea how to setup your own dns blacklist ?
    http://forums.cpanel.net/showthread....ght=blackholes

  8. #8
    Member
    Join Date
    Jan 2004
    Posts
    84

    Default

    Quote Originally Posted by Bruce
    THANKS minotauro
    Works like a charm !
    Any idea how to setup your own dns blacklist ?
    http://forums.cpanel.net/showthread....ght=blackholes
    Hello,

    I will test a blacklist and after post the correct config here.

    Regards,
    Minotauro.

  9. #9
    Member
    Join Date
    Jan 2004
    Posts
    84

    Default

    Quote Originally Posted by Bruce
    THANKS minotauro
    Works like a charm !
    Any idea how to setup your own dns blacklist ?
    http://forums.cpanel.net/showthread....ght=blackholes
    Hello Bruce,

    To configure a blacklists, open your /etc/exim.conf, and find the line "begin acl" (so so the line 230). Below I replicate my exim.conf with one blacklist already working (if you like configuration another blacklist, only replicate two line and change the URL of list and message).

    #!!#######################################################!!#
    #!!# This new section of the configuration contains ACLs #!!#
    #!!# (Access Control Lists) derived from the Exim 3 #!!#
    #!!# policy control options. #!!#
    #!!#######################################################!!#

    #!!# These ACLs are crudely constructed from Exim 3 options.
    #!!# They are almost certainly not optimal. You should study
    #!!# them and rewrite as necessary.

    begin acl

    #!!# ACL that is used after the RCPT command
    check_recipient:
    # Exim 3 had no checking on -bs messages, so for compatibility
    # we accept if the source is local SMTP (i.e. not over TCP/IP).
    # We do this by testing for an empty sending host field.
    accept hosts = :

    deny dnslists = sbl-xbl.spamhaus.org
    message = Connection denied spamhaus.org

    # Accept bounces to lists even if callbacks or other checks would fail
    warn message = X-WhitelistedRCPT-nohdrfromcallback: Yes
    condition = \
    ${if and {{match{$local_part}{(.*)-bounces\+.*}} \
    {exists {/usr/local/cpanel/3rdparty/mailman/lists/${lc:$1}/config.pck}}} \
    {yes}{no}}

    Regards,
    Minotauro.

  10. #10
    Member
    Join Date
    Jul 2003
    Location
    Lahore
    Posts
    26

    Default Regarding discard emails having .zip attachments

    Dear friends,

    If I want to discard emails having attchments of .zip extension, then what I need to set in CPanel filters for a specific domain. Waiting for th response.

  11. #11
    Member
    Join Date
    Jan 2004
    Posts
    84

    Default

    Quote Originally Posted by kashif
    Dear friends,

    If I want to discard emails having attchments of .zip extension, then what I need to set in CPanel filters for a specific domain. Waiting for th response.
    Hello kashif,

    I only know how to configure to all domain (in file /etc/antivirus.exim). Sorry!

    Regards,
    Minotauro.

Similar Threads & Tags
Similar threads

  1. SPAM Messages with Subject: "wrote: "
    By jonyzinho in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-01-2006, 09:07 AM
  2. mail subject: "Cron <root@ns> /scripts/cpbackup"
    By jorj1 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-26-2005, 11:43 AM
  3. CPanel "default address" not accepting email for "main account"
    By nsdesign in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-08-2005, 05:48 AM
  4. Can Not Delete Filters In "Block Email"
    By Lamar in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-10-2004, 12:50 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube