Create Whitelist to Exclude from Exim Sender Verify Callbacks

Create Whitelist to Exclude from Exim Sender Verify Callbacks – Auto Exclusion with Whitelist Guide

There are some non-existent and invalid email addresses that always been used by administrators to send out emails, especially notifications and subscriptions. Such email always has the common words such as nobody, bounce, request, root, anonymous and etc. You can use this assumption to instruct Exim to automatically allow emails with these senders to go through to the recipients without sender verification. This reduce the works to add email addresses to white lists.

  1. Create 3 files as below to act as your whitelists:
  2. In cPanel/WHM, click on Exim Configuration Editor under Service Configuration section. Then click on Advanced Editor button on the right pane.
  3. In Advanced Editor top most text box, add the following code (if there is existing text, add below them):
    domainlist rv_callout_sender_domain_whitelist = lsearch;/usr/local/cpanel/base/eximacl/rv_callout_sender_domain_whitelist
    domainlist rv_callout_receiver_domain_whitelist = lsearch;/usr/local/cpanel/base/eximacl/rv_callout_receiver_domain_whitelist
    domainlist rv_sender_verify_domain_whitelist= lsearch;/usr/local/cpanel/base/eximacl/rv_sender_verify_domain_whitelist
  4. Scroll down to the middle to locate the ACLs section, where 3 textboxes appear together (most likely top and bottom one are empty text fields). It should appears after begin acl.
  5. In the middle box of the 3, locate the following line:
    require verify = sender/callout

    Replace the above line with the following block of code:

    # Deny unless the sender address can be verified.
    deny message = From email address must be valid
    # do not check address for lists or bounces
    # or people in our company contact database
    !senders = ^.*-request@.*:\
    !domains = +rv_callout_receiver_domain_whitelist
    !sender_domains = +rv_callout_sender_domain_whitelist
    # do not check for DSN-ignorant domains
    # those that don't accept MAIL FROM:<>
    !dnslists =$sender_address_domain
    !verify = sender/callout=10s,defer_ok
    # Check that there is a MX record for those that do not
    # meet the deny statement requirements - ie bounces
    # No cost as previous lookup is cached if executed
    deny !sender_domains = +rv_sender_verify_domain_whitelist
    !verify = sender

  6. Click on the Save button on the bottom of Advanced Editor.
  7. Verify that Exim working properly by sending and receiving emails.
  8. If Exim is not working properly, check the configuration file again for errors.
  9. If Exim is working properly, add in the sender email address or domain that you’re having problem with to the white list files.
  10. Ask the sender to send email to you again to verify the delivery.