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 Configuration Editor Question

Discussion in 'General Discussion' started by HostDime, Apr 12, 2005.

  1. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I cannot edit exim.conf because a cPanel update will overwrite it.

    I need to change the IP used to send mail, within the Exim Configuration Editor in WHM.

    Each time I try, I place the code in the box below:

    message_prefix =
    message_suffix =

    I enter:
    interface = ip

    I also have tried:
    interface=ip

    An error displays at each save, "Invalid syntax"

    I thought the same thing would be typed as you would type in exim.conf directly.

    Does anyone have any advice on this?

    :eek:
     
  2. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I was looking through the exim site.. it appears there is really no other way to type that. Hmm.
     
  3. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    You need to find the folowing section of exim.conf (transports section)

    Code:
    remote_smtp:
      driver = smtp
    and then change that to

    Code:
    remote_smtp:
      driver = smtp
    
    interface = 123.123.123.123
    123.123.123.123 being the IP you want exim to use. Restart exim after making the change.
     
  4. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    Thanks.. but. ^
     
  5. Ramsy

    Ramsy Guest

    in shell edit /etc/exim.conf.dist (be sure to make a backup first)
    then save and do a /scripts/buildeximconf

    restart exim with service exim restart and you're done
     
  6. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    This way my changes won't be overwritten?

    Thank you.
     
  7. Ramsy

    Ramsy Guest

    not sure what other modifications you made ....
    check out exim.conf.local, exim.conf.localopts and exim.conf.dist
     
  8. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I think I will reword my question at this time. :)

    It is to my understanding and also confirmed by my testing, if you change the IP in exim.conf directly, it is overwritten with a cPanel update.

    I need to make a change, and have it stay. I don't need it to be overwritten.

    Therefore, I want to change it in WHM directly in the editor because it claims to not overwrite your changes if you do it that way.

    However, when I do this, I always get an error. Option INTERFACE unknown. Then it states that the changes have been saved, but they have not.

    So this is where I am. I need to know what to type since it is not accepting "interface".

    Here is what I type and what happens afterwards, with screenshots.

    I hope that we can figure this out here and hopefully help someone else out in the future. This problem so far is driving me batty and I wouldn't wish this on anyone. :eek:

    [​IMG]

    [​IMG]
     
    #8 HostDime, Apr 14, 2005
    Last edited: Apr 14, 2005
  9. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    As mentioned, if you want to change the IP that exim binds to, you need to add this

    Code:
    remote_smtp:
      driver = smtp
    
    interface = 123.123.123.123

    You added the interface config in the wrong section of exim.conf - Try adding it where I suggested and it will work, directly under the existing driver = smtp line, you need interface

    You may not be able to edit that using the whm editor, as I don't think it allows an entry there, no box on that part. Enter it manually and see if that works for you, I have been adding this config to exim for near 2 years, so it should work for you 2 :)
     
  10. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I understand where to add it in exim.conf. But I do not want to add it there. This is the issue. ;)

    It will get overwritten when cPanel updates.

    It seems it is not possible to make this change in WHM.

    If so, this is not very good.
     
    #10 HostDime, Apr 14, 2005
    Last edited: Apr 14, 2005
  11. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Ok, fair enough, I was just explaining why you were getting the error, as you seem to be confused with the exim.conf syntax and why the error was being displayed.

    I always keep a copy of exim.conf and if it gets wiped, I install the backup copy, write a /scripts/postupcp to make the change automatically, if exim.conf gets updated.
    I haven't found it to be too much of a problem, as I liked to make sure that exim updates were done manually and that isn't all that often that exim needs reinstalling or updating.

    You may be able to add the interaface config manually to one of the exim.conf.* files to have the changes written back automatically too should it get updated, but I've never looked into that, maybe you could trial and error it or maybe someone else can chime in with that info.
     
  12. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I always edit exim.conf without issues. I recently discovered that a cPanel update wipes changes that I make to the file.

    This is why I want to edit the file via WHM. I need to do this to a few servers, and would like the change to stay.

    But the edit box does not appear directly below driver = smtp.
    Though there is one above that section.

    Either box gives me the same error as seen in the screenshot.
     
  13. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I think what Ramsy mentioned might be the solution but I wasn't sure if he understood what I was doing, since there appeared to be some confusion.

    "in shell edit /etc/exim.conf.dist (be sure to make a backup first)
    then save and do a /scripts/buildeximconf

    restart exim with service exim restart and you're done"

    Ramsy, can you confirm that it's a permanent change? Thanks!
     
  14. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    I emailed cPanel the same day I asked here, they do not have the explanation either.
     
  15. fmalekpour

    fmalekpour Well-Known Member
    PartnerNOC

    Joined:
    Dec 4, 2002
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Changes will not be permanent, Here is what you need to do:

    In WHM on Exim Configuration Editor, rewrite two routers, There is an edit box bellow "ROUTERS CONFIGURATION", Box is before "lookuphost" router, Put these lines to that box:


    (7th box from top in exim configuration)

    Then move down to "TRANSPORTS CONFIGURATION", On edit box there (just up the remote_smtp transporter) put these lines:

    (12th box from top in exim configuration)
    This will be permanent and will not change by CPanel updates.


    Good Luck
    F.Malekpour
    Dayana Networks Ltd.
     
  16. HostDime

    HostDime Well-Known Member
    PartnerNOC

    Joined:
    Mar 15, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida
    "This will be permanent and will not change by CPanel updates."

    :eek: :eek: :eek:

    :D

    Thank you! I will try this out.
     
  17. SubZero

    SubZero Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Balmumcu, Istanbul, TR
    Hi,

    Thanks for the lift. I now managed to set some hosts to avoid TLS with this modification:
    Code:
    my_remote_smtp:
      driver = smtp
      hosts_avoid_tls = lsearch;/etc/tlsdisabledhosts
    Thank you.. :)

    I have another question for this setup.

    I have 3 IPs and hosting 15 domains. They all use the same IP (my 1st IP) for sending out emails. Lets say I list my domains on /etc/mysecondip and /etc/mythirdip. Lets say if the domain is on the /etc/mysecondip, send the mail thru my second IP; and if the domain is on the /etc/mythirdip, send the mail thru my third IP; and for all remaining mails, send them using my first ip. Can you please help me with this configuration?
     
  18. 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
    There's a command line option to exim to provide this functionality that I found one day when I was looking for an answer to this problem when I was being blocked by a somewhat difficult to deal with email service.

    The -oMi option is the option in question. I ended up using the "interface =" method myself, so I'm not sure whether it works, or whether I've actually correctly understood what the option is for.

    It's documented in: http://www.exim.org/exim-html-4.10/doc/html/spec_5.html
     
  19. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    quoting subzero

    Hi,

    Thanks for the lift. I now managed to set some hosts to avoid TLS with this modification:
    Code:
    my_remote_smtp:
    driver = smtp
    hosts_avoid_tls = lsearch;/etc/tlsdisabledhostsThank you..

    I have another question for this setup.

    I have 3 IPs and hosting 15 domains. They all use the same IP (my 1st IP) for sending out emails. Lets say I list my domains on /etc/mysecondip and /etc/mythirdip. Lets say if the domain is on the /etc/mysecondip, send the mail thru my second IP; and if the domain is on the /etc/mythirdip, send the mail thru my third IP; and for all remaining mails, send them using my first ip. Can you please help me with this configuration?


    would you mind updating us for this issue?
     
    #19 katmai, Jul 13, 2006
    Last edited: Jul 13, 2006
  20. DaveT

    DaveT Active Member

    Joined:
    Aug 20, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    No longer works under cPanel 11 exim

    Hi,

    It appears that the re-written routers are ignored since updating to cPanel 11. Everything gets sent using remote_smtp instead of my_remote_smtp even though the routers are identical (apart from the name) and the my_remote_smtp router in earlier in the exim config file.

    Has anyone got a solution to this which won't get overwritten by every cPanel / exim update?

    Thanks,
    Dave.
     
Loading...

Share This Page