Problem: Emails with invalid user delivers to server

REXNET

Member
Jan 31, 2012
10
0
51
San Francisco
cPanel Access Level
Root Administrator
I was programming an email validation script and while testing I found that emails with an invalid users deliver to the server successfully and it make my script to report that email address "IS VALID" ! I tried on several domains and all of them were okay but mine.

Is there any special configuration on EXIM to not accepting wrong emails and reject them?!
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
In the cPanel account that accepted the email, find the icon titled Default Address. Whats are these settings set to?
Preferred would be: Discard with error to sender (at SMTP time)

In WHM > Server Configuration > Tweak Settings, Mail tab, find this setting:
Initial default/catch-all forwarder destination
Forwarding destination for a new account’s catch-all/default address. (Users may modify this value via the Default Address interface in cPanel.) “fail” rejects the message and notifies the remote SMTP server; this is usually the best choice if you are getting mail attacks. “blackhole” accepts and processes the message but then silently discards it; this avoids notifying the remote SMTP server but violates SMTP RFC 5321 and generally should not be used.
And set it proper as well. I believe this is what you seek. :)
 

REXNET

Member
Jan 31, 2012
10
0
51
San Francisco
cPanel Access Level
Root Administrator
Thanks for reply. The "Default Address" is set on "Forward to your system account" , I've fixed Tweak settings and set the value on "Fail" but the "Default Address" didn't change, And the problem still exists.
 

REXNET

Member
Jan 31, 2012
10
0
51
San Francisco
cPanel Access Level
Root Administrator
I changed the client setting manually and set it to "Discard with error to sender (at SMTP time)" and now my script work well, The server is rejecting invalid user emails. How can i fix all exists Host Accounts following same settings as default ?!