Child pages
  • Configuring SMTP Relay Server

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please ensure that this new server is installed with a RHEL/CentOS 6 distrubution able to support Exim mail server.

Ensure we have the latest EPEL repository RPM for CentOS 6 64-bit on the new server and do the following:then follow the steps below.

Code Block
#> wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#> rpm -ivh epel-release-6-8.noarch.rpm
  1. Install Exim mail server via yum:

    Code Block
    #> yum install -y exim-mysql
  2. Stop the Postfix and enable Exim server:

    Code Block
    #> service postfix stop
    #> chkconfig postfix off 
  3. Set Exim as the default MTA:

    Code Block
    #> alternatives --config mta
    There are 2 programs which provide 'mta'.
     
      Selection    Command
    -----------------------------------------------
    *+ 1           /usr/sbin/sendmail.postfix
       2           /usr/sbin/sendmail.exim
     
    Enter to keep the current selection[+], or type selection number: 2 
  4. Set auto start on boot and start the exim service:

    Code Block
    #> chkconfig exim on
    #> service exim start
  5. Now that the Exim server is installed and running you must add the <IP_of_current_server> to the exim.conf file:

    Code Block
    #> vi /etc/exim/exim.conf
  6. Inside exim.conf locate "hostlist relay_from_hosts =" and add the IP of your current server and save the file:

    Code Block
    hostlist relay_from_hosts = <IP_address_of_current_server>

    **Please check how many IPs are assigned to the current server. Exim can send emails from more than one IP. All these IPs should be added to the Exim configuration on Relay side. The IPs must be separated by ":"

    Code Block
    hostlist   relay_from_hosts = 127.0.0.1 : <additional_ip> : <additional_ip> : <additional_ip>
  7. Restart Exim

    Code Block
    #> service exim restart
    #> /etc/init.d/exim restart 

...