The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email - filters or fowarding ?

Discussion in 'E-mail Discussions' started by peterr, Oct 25, 2006.

  1. peterr

    peterr Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    I have the default address set to :fail:

    I don't use any accounts, but have all the email fowarded, by a few different foward records in CPanel. Being subscribed to a number of different forums, one of the fowarders was to simply fwd to my personal (ISP) email address.

    Problem: - Now I'm getting a significant volume of spam, and it has come from a forum subscription. Somehow, the email address has been compromised, but as this fowarder is used for several forums, I have no idea where the "leak" is.

    So, after reading this , I decided to try a filter. For testing purposes, I simply set it up as per the example, sent an email, but it bounced back. :(

    The CPanel filter test told me this ........

    The email I sent was to prefix_eerhjreh@example.com

    1. The "test filter" in CPanel told me it would be deleivered to my ISP address, but it bounced. Is the filter test accurate ?

    2. Does the email address "prefix_eerhjreh@example.com" have to be a real address ? My ISP address ("Deliver message to") is a real address, but "prefix_eerhjreh@example.com" is not. I can use an alias in a fowarder, so I assume an alias can be used in filtering also.

    Any clues please ?
     
  2. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    This does work. It works with forwarders, real address, both local and remote.

    make sure it reads as:


    Filter Maintenance


    Filter Destination

    $header_to: matches "pre_.+@domain.com" user@other.com
     
  3. peterr

    peterr Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    I set it up exactly as you have shown, and a test email to "pre_5678@domain.com" bounced back ..

    1. The email address "pre_5678@domain.com" is not a real address. The domain "domain.com" is the domain where the Cpanel/filter is setup.

    2. The email address "user@other.com" is a real address, at the ISP I use.

    So, it sounds like the filter _should_ work okay, and send the email to my ISP email address, but it doesn't work as it should ?

    Thanks !!
     
  4. peterr

    peterr Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Does anyone else have filters setup like I require ?

    1. Default address set to :fail:

    2. Don't use any (email) accounts.

    3. Have a few fowarders setup for other purposes.

    4. Have a filter setup, defined as:

    $header_to: matches "pre_.+@domain.com" user@other.com

    where "domain.com" is your domain, where CPanel is used.
    "user@other.com" is a real address.

    5. You can send an email to "pre_5678@domain.com" and it gets delivered to "user@other.com"

    Edit: 6. "pre_5678@domain.com" is not a real address

    Thanks !!
     
    #4 peterr, Oct 26, 2006
    Last edited: Oct 26, 2006
  5. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    I can assure you that this does work okay.

    You may want to tail your logs and see what sort of errors if any you are getting. That's probably the best place to look for clues. Post back what you find.
     
  6. peterr

    peterr Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Okay thanks.
     
  7. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    This is utter nonsense.

    If the default address is set to :fail: and mail comes in to teh server destined for a nonexistant address, the MTA is going to reject the mail regardless of whatever filters you have in place.
     
  8. peterr

    peterr Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    I have edited post #4
     
  9. peterr

    peterr Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Okay thanks. For now, the only method to do this will be by adding fowarders (aliases).

    Thanks for your help. :)
     
  10. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    >> This is utter nonsense.

    yes, this won't work with fail, you also need to set up an accept condition in your exim conf.
     
Loading...

Share This Page