How to Configure the Exim Outgoing IP Address

Overview

By default, Exim sends mail from the server's primary IPv4 address. To decrease the chance that spam filters mark your mail as spam, verify that the reverse DNS (rDNS) entry of Exim's outgoing IP address matches the DNS response of your server's hostname.

Note:

The steps in this document require root-level privileges on the server.

Modify Exim's preferences for outgoing mail

cPanel & WHM offers two ways in which you can modify Exim's default preferences for outgoing mail's IP address.

Enable automatic configuration of the server's IPv4 address for outgoing mail

To automatically configure Exim to send mail from each domain's dedicated IPv4 address, perform the following steps:

  1. Modify the rDNS for each IPv4 address to point to the desired domain. 

    Important:

  2. Enable the Send mail from account's dedicated IP address option in WHM's Exim Configuration Manager interface ( Home >> Service Configuration >> Exim Configuration Manager ).

    Warning:

    If you select this option, cPanel & WHM uses the /usr/local/cpanel/scripts/updateuserdomains script to automatically configure Exim, and overrides any manual changes in the following files:

      • /etc/mailhelo
      • /etc/mailips

Manually configure Exim's outgoing IP addresses

Warnings:

  • We do not recommend that you modify your Exim files. To send outgoing mail with each account's dedicated IP address, enable the Send mail from account's dedicated IP address option in WHM's Exim Configuration Managerinterface ( Home >> Service Configuration >> Exim Configuration Manager ).
  • To modify your Exim configuration files, you must have root user privileges.
  • If you enable the Send mail from account's dedicated IP address option, it will overwrite any changes that you make in the Exim configuration files.

To use a custom Exim configuration, enable the following options in the Basic Editor section of WHM's Exim Configuration Manager interface (Home >> Service Configuration >> Exim Configuration Manager):

  • Reference /etc/mailhelo for outgoing SMTP HELO
  • Reference /etc/mailips for outgoing SMTP connections

The /etc/mailhelo file

The /etc/mailhelo file contains Exim's configuration for the HELO command, which initiates dialog between a mail server and a client. This file governs which domain sends the HELO command.

Use your preferred text editor to create an /etc/mailhelo file that resembles the following example:

1
2
3
4
5
example.com: example.com
sub.example.com: example.com
example.net: example.net
addon.example.net: example.net
*: hostname.example.com

The /etc/mailips file

The /etc/mailips file controls the IP address from which each domain sends mail.

Warning:

If you enable the Send mail from account's dedicated IP address setting in the Basic Editor section of WHM's Exim Configuration Manager interface (Home >> Service Configuration >> Exim Configuration Manager), the system willoverwrite any manual changes that you subsequently make to the /etc/mailhelo and /etc/mailips files.

Use your preferred text editor to create an /etc/mailips file that resembles one of the following examples:

 Click to view IPv4 example
 Click to view IPv4 and IPv6 example
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Troubleshoot High Disk IO Problems

Overview Disk I/O describes how long the read and write operations require on a hard disk. The...

How to Disable Network Manager

Overview This document describes how to disable the Network Manager service. The Network Manager...

Proxy Subdomains Explanation

Overview This document provides an overview of proxy subdomains. In cPanel & WHM version...

Passive FTP and NAT Configuration Temporary Workaround

Overview cPanel & WHM's implementation of PureFTP and ProFTPd causes an issue on...

How to Update Your System

Overview This document describes the steps to update your system. Update your system...