Need to Allow Only Specific Email Addresses

urantian

Well-Known Member
Jan 26, 2005
97
1
158
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
 

cpanelinfoseeker

Well-Known Member
Oct 25, 2002
323
3
168
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
 

cpanelinfoseeker

Well-Known Member
Oct 25, 2002
323
3
168
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
 

urantian

Well-Known Member
Jan 26, 2005
97
1
158
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