The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exim rotate ips how to?

Discussion in 'E-mail Discussions' started by ronanc, Jun 4, 2013.

  1. ronanc

    ronanc Registered

    May 15, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hey cool dudes, i found this tutorial on google:


    First, you need a function that pick a random IP from a list. Add it to
    /etc/ (somwhere at the end, above last line)

    sub randinet {
    @inet = ("x.x.x.1", "x.x.x.2", "x.x.x.3", "x.x.x.4");
    return $inet[int rand($#inet)];

    Then edit /etc/exim.conf and search for a line that start with “interface=”

    driver = smtp
    interface = ${if exists

    replace last line with

    interface = "${perl{randinet}}"

    You can do the same for dk_remote_smtp section (this is used for sending
    signed mails). Restart exim and search the logs for possible errors.

    BTW, for the record, i coped those lines from following link



    I made all the changes, but the smtp banner still the same, causing bad delivery of some emails...

    How can we use 3 different ips in exim each with your correct smtp banner/rdns ???

    Ill rotate all ips for the stmp server, for all domain/accounts in this server..

    Can i setup for example 5 ip's with at rdns ? this will solve this issue?

    Or for each ip adress i need to rdns an different name like or ore can i rdns all ips like

    x.x.x.x ->
    x.x.e.r ->

    Can anyone help ?

    thanks in advance!

    #1 ronanc, Jun 4, 2013
    Last edited: Jun 4, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you elaborate on why you prefer to rotate the IP addresses used by Exim for sending emails? Have you considered using the options available in cPanel to change the IP address used by Exim for sending email? This is documented at:

    Exim Different IPs

    Thank you.

Share This Page