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.

more than one IP for EXIM

Discussion in 'E-mail Discussions' started by Claus, Apr 4, 2007.

  1. Claus

    Claus Registered

    Joined:
    Dec 25, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I saw a bug on cpanel when using EXIM

    We have more then one IP on our server but I saw that EXIM use only one shared IP address

    one of my client who has a dedicated IP address I want to use for sending mail that dedicated IP address

    how can I do that ?
    regards,
    Claus
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    As far as I know, the email always go from the server main IP address IF you haven't bind exim to any other IP address. It doesn't matter that whether a domain is on shared Ip or on dedicated IP, all emails will go through the server main IP.
     
  3. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Some notes I made a year ago:

    from: http://forums.cpanel.net/showthread.php?t=36862

    Find this part of exim.conf
    remote_smtp:
    driver = smtp

    and change it to
    remote_smtp:
    driver = smtp
    interface = 123.123.123.123

    Where 123.123.123.123 is your IP to set the mail server to use.

    Make sure that you have a new PTR (reverse dns) record added by the datacenter for that IP.

    also - command line option for doing the same: -oMi

    The manual page suggests that this can also be done by command line via -oMi - that be might be smarter - as the config where exim is started is less likely to be subject to being overwritten.

    Check out the link above for lots of discussion on the topic.
     
  4. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    The above will only change the main IP address, if I'm not mistaken. I took the OP message as wanting to use the dedicated IP for his dedicated customer, and the rest use the main IP. I don't think that can be done...
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    You're not mistaken, what I quoted was for changing only the main/default IP for Exim. The guts is in the links; I might be mistaken too but I think that one of the posts in the linked thread in my earlier longer post actually describes how to change the IP on a per-domain basis. Don't have time to dig through at the moment, but if you can't find it let me know and I'll check further. A post or two describing how to do that definitely exists; it might be in another thread though (or even in a DC forum). Sorry for the vagueness ...
     
  6. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    If it's just for one domain, you can do this:

    Code:
    remote_smtp:
      driver = smtp
      interface = ${if eq{$sender_address_domain}{example.com}{1.2.3.4}{5.6.7.8}}
    
    where:
    1.2.3.4 is the IP you want to use for that domain
    5.6.7.8 is the usual IP
     
  7. rogcan

    rogcan Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    does the example.com need to be changed to the domain name you want to use or leave it like that ?
     
  8. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    For some reason all I get is an error when exim attempts to startup. I have changed example.com to my domain, and both sets of IP's. Perhaps I am entering this into the wrong section? Could someone clarify?

    Thanks,
    Ron
     
  9. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    My mistake, I was trying to edit through WHM. Editing exim.conf directly, it works fine.

    There are days I should not write.....
    Ron
     
    #9 cpanelinfoseeker, Apr 24, 2007
    Last edited: Apr 24, 2007
  10. larryl

    larryl Active Member

    Joined:
    Feb 19, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
  11. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I must be doing something wrong or I am misunderstanding what this is going to do for me.

    I added the necissary sections to my exim.conf through whm. exim restarted fine.


    But when I do a manual smtp through telnet when I run HELO I am still getting the main server domain in the reply.

    so if my main host is mainhost.com and the host I want to have a static ip is specialdomain.com

    telnet specialdomain.com 25
    Trying ip ....
    Connected to specialdomain.com.
    Escape character is '^]'.
    220-mainhost.com ESMTP Exim 4.63 #1 Tue, 24 Apr 2007 19:37:17 -0500
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    HELO
    250 mainhost.com Hello [my ip]
    quit
    221 mainhost.com closing connection
    Connection closed by foreign host.

    I am expecting to see specialdomain.com throught this connection process. since having mainhost after the HELO be different from the sending domain breaks rfc compliance.

    Or am i just missing something here?
     
  12. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    I thought that the absence of an error when restarting exim meant it was working, but after further testing, I still send from the main IP, not the changed one.

    Sorry about the incorrect report of success earlier,
    Ron
     
  13. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I just found the helo_data setting.

    You should use it like this

    beedomain_remote_smtp:
    driver = smtp
    helo_data = beedomain.tld

    That should fix my issue .... but it still not seeming to send from the other ip at any rate.


    bummer .... can anyone else shed some light on this?
     
  14. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I cant seem to change the helo data or get it to send from a differnet ip. Has no no one successfully done this?
     
  15. rogcan

    rogcan Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    I've tried everyone of them posted in these forums and i havent got it to work but thats just my opinion...

    We should be able to change our EXIM IP# in WHM instead of only using the server main IP address :(

    Let's hope they add this function in the near future.
     
  16. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Even if I can just get it to work outside exim i will be happy. I can cron a copy back or have it done on startup.

    Any hack will work but these small details sure take down delivery rates
     
  17. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    You'll need to put something like this near the top of your .conf for the HELO:

    smtp_active_hostname = ${if eq{$interface_address}{111.222.333.444}{host_1}{host_2}}

    I don't have any problem getting this to work; I don't know why it's not working for you. Do you perhaps have a seperate exim_outgoing.conf? If so, you need to put this stuff in there.
     
  18. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    That worked perfect to fix my helo issue. Thanks much!

    I wonder if I make the changes to my exim.conf manually for the "static" ip if it will work properly.
     
  19. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Any way to change the greeting depending which ip its comming in on?

    telnet mail.differentdomain.com 25
    220-host3.domain.com ESMTP Exim 4.63 #1 Wed, 25 Apr 2007 17:04:14 -0500
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    helo
    250 mail.differentdomain.com Hello [myip]
     
  20. cmdln

    cmdln Active Member

    Joined:
    Mar 17, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hum so my helo is right upon connection. Greeting still is a mis match. I added the interface = ${if eq{$sender_address_domain}{example.com}{1.2.3.4}{5.6.7.8}} under remote_smtp and now when I send through that ip the mail shows that it comes from that ip but the helo in the header is wrong.

    Received: from mail.correctdomain.com (HELO mail.wrongdomaind.com (correctip)

    any ideas on that?
     
Loading...

Share This Page