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.

Edit exim.conf

Discussion in 'General Discussion' started by dev_cw, Jan 25, 2007.

  1. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    Hello,

    I am trying to edit my exim.conf file but am having some tropuble.

    1) when I edit it in Exim Configuration Editor it will record the changes but I don't think that the changes are working, I removed a few ACLs that were still working after the update. If I look into the exim.conf file it has not been updated.

    2) The exim.conf.buidtest has been updated to reflect my changes and the contents of the 'edit' boxes can be found in exim.conf.local

    3) If I try to copy replace exim.conf I get:
    Code:
    root@server [~]# cp /etc/exim.conf.buildtest /etc/exim.conf     
    cp: overwrite `/etc/exim.conf', overriding mode 0644? y
    cp: cannot create regular file `/etc/exim.conf': Permission denied
    So my question is how do I effectively edit the exim configuration.

    Thanks
     
  2. hariskhan

    hariskhan Well-Known Member

    Joined:
    Apr 15, 2004
    Messages:
    146
    Likes Received:
    0
    Trophy Points:
    16
    Try this

    Run exim -bV
     
  3. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    I get:
    However I still cant edit the file since it claims I don't have permission which is odd since I am running as root. When I try to edit I get:
    Code:
    root@server [~]# cp /etc/exim.conf.buildtest /etc/exim.conf     
    cp: overwrite `/etc/exim.conf', overriding mode 0644? y
    cp: cannot create regular file `/etc/exim.conf': Permission denied
    And the saved conf from whm is not being used, so my edit is not working.

    All the exim.conf files have the same owner and group so I don't understand the permission error?

    Code:
    -rw-r--r--   1 root     root    39007 Jan 11 19:22 exim.conf
    -rw-r--r--   1 root     root    39007 Jan 25 23:25 exim.conf.bkup
    -rw-r--r--   1 root     root    39023 Jan 25 22:57 exim.conf.buildtest
    -rw-r--r--   1 root     root    11551 Jan 25 22:57 exim.conf.local
     
  4. WillyBoy

    WillyBoy Member

    Joined:
    Jan 23, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I had the same experience as you, but I noticed something. It appears to me that exim.conf.buildtest or exim.conf.local are a symbolic link to exim.conf.
    I will confirm later on today and check to see, but I recall seeing that when I was editing this file via the exim configurator in WHM.
    Have you tried to restart exim after you made yoru changes and test out those changes to see if they are working as you expected them to be?
    Thanks,
    WB
     
  5. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    No, the changes are not working after restart exim. The file does not look like a symlink.

    Thanks
     
  6. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    try
    Code:
    lsattr /etc/exim.conf
    and see if you have i set it should look like

    Code:
    lsattr /etc/exim.conf
    ------------- /etc/exim.conf

    A file with the ‘i’ attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file.
     
  7. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    I do get:
    Code:
    lsattr /etc/exim.conf
    ------------- /etc/exim.conf
    If this is the case what can I do? It is not being written to from the Exim Configuration Editor so I can't edit any ACLs.

    I am stumped.

    In case it helps I am on CentOS 4.4 currently running cPanel 10.9.0-C131 but this started when I updated to C117.

    ____
    Update: I think I found the cause of this, it turns out that my host super usered in to my VPS and edited the exim.conf to remove the reference to relays.ordb.org since they closed down. I have a super user login warning that I received by e-mail on Jan 11 and the only edit is the removal of the relays.ordb.org reference...I HATE it when sysadmins do something and don't tell you (or the rest of the support staff) about it!!! Even if it was for a good cause. For now I wait for level-3 to unlock the file.
     
    #7 dev_cw, Jan 26, 2007
    Last edited: Jan 26, 2007
  8. kdarray

    kdarray Well-Known Member

    Joined:
    Apr 13, 2006
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Washington
    try this

    try running this command to change the attributes of the file so you can edit and save. i had this same issue about a month ago:

    chattr -RV -i /etc/exim.conf
     
Loading...

Share This Page