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 on a different IP address

Discussion in 'E-mail Discussions' started by novi, Aug 15, 2009.

  1. novi

    novi Registered

    Joined:
    Nov 11, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Did anybody tried to use Exim on a different IP address then the main IP address of the server?
    I have to change IP because of the spam script which was installed on one of the user's accounts. I used then configuration with dedicated addresses for accounts and exim option to use account's address to send email. Unfortunately it works till customers don't use forwards. Then main IP address is used to send emails. So to try not to make upside down change of the whole server I thought about just changing IP which Exim is using as main IP when it is not using account's IP when it is forwarding.
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
  3. novi

    novi Registered

    Joined:
    Nov 11, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Maybe I'm wrong, but I think that in the post you linked, guy is breaking the whole idea of dedicated IPs and sending emails over account's IP.
     
  4. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    Did you try the following?

    Open the exim.conf file. Go to the section 'TRANSPORTS CONFIGURATION' .

    Add the following line at the beginning of the above section :

    interface=<ip>

    Make sure that rDNS is set up fine for the above IP that you are going to use.
     
  5. krish_ven

    krish_ven Registered

    Joined:
    Aug 24, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    If you are in the danger of getting your main server IP block by SpamCop because you had a few anoying spamers abusing your server then you could simply change your exim mailserver IP to avoid the effect of your main IP beeing blacklisted…………

    Below are some simple steps of changing your exim IP

    Inside both incoming and outgoing exim mail server you will need to add an interface :
    so just edit

    pico /etc/exim_outgoing.conf

    and

    pico /etc/exim.conf

    find
    remote_smtp:
    driver = smtp

    and add interface = ip.you.want.to.use

    example as shown below:

    ________________________
    remote_smtp:
    driver = smtp
    interface = 22.22.22.22
    By giving the domain name & you can chk get the ip address from ip-details.com
     
  6. novi

    novi Registered

    Joined:
    Nov 11, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Here is original configuration of Exim:

    remote_smtp:
    driver = smtp
    interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
    helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostn
    ame}}}{$primary_hostname}}

    interface is responsible for outgoing traffic. It takes ip of the sender's domain. The same with helo. Removing existing code and putting single IP address will suppress exim from sending emails with account's ip addresses.

    So does anyone know how to configure it properly?
     
  7. darksen

    darksen Member

    Joined:
    Sep 30, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Sorry to interupt. As I'm also want to use it infact I did the following


    remote_smtp:
    driver = smtp
    #interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
    interface = IP HERE
    helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}


    dk_remote_smtp:
    driver = smtp
    interface = IP HERE
    #interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
    helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
    dk_private_key = "/var/cpanel/domain_keys/private/${dk_domain}"
    dk_canon = nofws
    dk_selector = default


    it works on my one server but on the second server. All emails from webmail goes to Mail que and its not sending. Any INputs on whay other files to check why webmail goes to que? using outlook using smtp of isp works.
     
Loading...

Share This Page