Properly Reject Invalid Email Exim

Properly Reject Invalid Email Exim

Tired of seeing your mail queue fill up with bounce messages to non-existant spammer email addresses? By default, if an email comes into your server addressed to an invalid recipient, Exim will accept the message from the delivering agent, and then generate a return email to them explaining that the address is invalid. With this little tweak, you can make exim tell the delivering agent that that address is invalid at the time the message is being delivered, meaning no more spam returns cluttering up your queue! Can I get an Amen!? Read on!

This is curtesy of cyberspirit in the cpanel forums. Original thread is loacted here.

Method 1)
1. Open WHM and click on Exim Configuration Editor

2. Click on the Switch to Advanced Mode button.

3. Scroll down until you see the section on ACL’s. You’ll see three boxes. In the middle box, locate the section that reads – See Section A:

Method 2) Recommended

1. Login into SSH and su to root

2. pico /etc/exim.conf

3. Ctrl + W and type in: accept  domains   Notice the two spaces. Look for something like this below.

Section A:
accept  domains = +local_domains
accept  domains = +relay_domains
accept  hosts = +relay_hosts
accept  condition = ${perl{checkrelayhost}{$sender_host_address}}

Between

accept domains = +local_domains

and

accept domains = +relay_domains

add the following:

endpass
message = unknown user
verify = recipient

Make sure each line lines up. You might need to add two spaces before each line. The final section will look like this:

accept domains = +local_domains
endpass
message = unknown user
verify = recipient
accept domains = +relay_domains
accept hosts = +relay_hosts
accept condition = ${perl{checkrelayhost}{$sender_host_address}}

Scroll all the way to the bottom and click on Save.

That’s it! Welcome to much smaller mail queues!

Similar Articles : Change All Packages Themes cPanel/WHM, Change All User Themes cPanel/WHM, Official cPanel/WHM Newbies Guide, Updating Apache Using cPanel/WHM Easy Apache, Extended Exim Logging, Linux Apache ASP for cPanel/WHM, How to Hide Bind Version cPanel/WHM, Fix cPanel/WHM Quotas, Disabling Password Reset Option cPanel/WHM, Setting up Private Reseller Name Servers, Installing DrWEB antivirus cPanel/WHM Linux, Properly Reject Invalid Email, Securing /tmp partition, Force Secure Login cPanel/WHM SSL, Default Index cPanel/WHM, Modify Bandwidth Exceeded cPanel/WHM, Use Exiscan to Scan For Viruses, Fix Log Rotation Problems cPanel, Installing mod_bandwidth For the Ultimate in Apache Utilization Control, Linux Distributions, UNIX Flavors (Distributions), Installing and Configuring CSF Firewall