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.

Need to Allow Only Specific Email Addresses

Discussion in 'E-mail Discussions' started by urantian, Mar 19, 2005.

  1. urantian

    urantian Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Fayetteville, Arkansas
    cPanel Access Level:
    Root Administrator
    One of my accounts requires a number of different email addresses, to be used for routing mail during downloading. However, the various addresses must all be sent to the same mail box account on the server. In addition, any email addressed to an unwanted username must be discarded.

    I used mail filtering rules to route only the wanted addresses to the account's mail box. However, how do I block the unwanted addresses?

    I found that if I set the default address to ":fail:" on unrouted mail, none of the filtered mail gets through. Rather, the default address must be set to the mail box. However, this defeats the purpose of the email filtering, because all email addresses are getting through.

    How can I get this to work? Would the RegEx filtering work, to discard all but the desired email? If so, how is the RegEx filter set?

    ---Michael
     
  2. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    323
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    What I do is set :fail: and then setup my forwards for all the different email addresses to the actual email account that will receive the emails. When I download the emails (pop3) I use the filters in my email program to put them into the proper folders based on the "To:" field, or sometimes by the "Subject:" field .

    Hope this helps,
    Ron
     
  3. urantian

    urantian Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Fayetteville, Arkansas
    cPanel Access Level:
    Root Administrator
    Thanks for writing! Perhaps I'm doing something wrong. I set up a forwarder to an external account and set the default address to :FAIL:, and the mail is not getting through.

    ---Michael
     
  4. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    323
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    You might try using just the forwarders without the filters. I have used forwarders for many years setup with ":fail: Restricted email addresses - Please send to correct address" for the default address. Usually I am sending to an email address on the same domain, but for the important emails I have it send to an email account on a different server in addition to the one on the same domain.

    Currently I have 78 forwarders in place going to 2 email accounts on the same domain and forwarding 3 addresses also to my email account on another server/domain. Recently the additional message after ":fail:" is no longer being returned to the sender, but is still failing the email addresses that do not exist.

    Best of luck,
    Ron
     
  5. urantian

    urantian Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Fayetteville, Arkansas
    cPanel Access Level:
    Root Administrator
    It Works!

    Hi Ron,

    Thanks again for writing! I got it to work. I was attempting to filter or forward mail to the default account, which was set to FAIL by default! After setting up separate email accounts, forwarding the accepted addresses, and setting the default to FAIL, everything seems to work.

    ---Michael
     
Loading...

Share This Page