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.

How to tell exim to discard undelivered after 5 days / 5d?

Discussion in 'General Discussion' started by spaceman, Nov 4, 2006.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Hi All,

    An older server of mine used to discard undelivered mail after 5 days (5d) on the queue. I've recently got a new server, and it appears to keep mail for 7 days before discarding. I reckon 5 days is ample - how/where do I set it back to 5 days?

    Thx.
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    WHM>>>>>>Service Configuration>>>>>>>>>>Exim Configuration Editor>>>>>>>>>>>>>Advanced mode.
    In the first box white put this lines:
    Code:
    auto_thaw = 5d
    ignore_bounce_errors_after = 5d
    
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can also use:

    timeout_frozen_after = 5d

    That way any undeliverable email will also be dropped after 5 days and avoids the auto_thaw.
     
  4. mambovince

    mambovince Well-Known Member

    Joined:
    Jan 15, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    London, UK
    I get loads (100's) of frozen emails in the queue every 2/3 days and usually get rid of them via SSH using:

    exim -bpru|grep frozen|awk {'print $3'}|xargs exim -Mrm

    Chirpy, are you suggesting to just replace the 1st line?
    PHP:
    timeout_frozen_after 5d
    ignore_bounce_errors_after 
    5d
    Many thanks,

    - Vince
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes. That's all you should need from the description of the functions in the exim docs. Setting them lower might be more sensible:

    timeout_frozen_after = 4d
    ignore_bounce_errors_after = 1d
     
  6. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    The above setting is exactly what I have in the first available text area in the advanced exim editor in WHM, and yet still I have mail in my queue that is 7 days old.

    Searching down the exim settings that I can't change, I can see in the MAIN CONFIGURATION SETTINGS section is this:

    ignore_bounce_errors_after = 7d
    timeout_frozen_after = 8d

    So it seems to me like my settings are not overriding these settings?
     
  7. bshelton@ole

    bshelton@ole Member

    Joined:
    Jul 7, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Yep. Same here. The overrides aren't working.

    Did I miss some other comment concering this that interacts with these commands in order to make them effective?
     
  8. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    16
    It works. Just manually check /etc/exim.conf and you'll see that new setting have been applied.
     
  9. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    I just checked /etc/exim.conf and I can confirm that the changed I put in WHM > Exim Configuration Editor are *not* being applied to exim.conf. Here's an excerpt from my exim.conf, note where it says "[ This is the only occurrence ]" in relation to a search for 'ignore_bounce", i.e. cjust to check it wasn't being set elsewhere in the the file:

    -----------------------------------------------
    # primary_hostname =
    deliver_queue_load_max = 3
    auto_thaw = 6d
    ignore_bounce_errors_after = 7d
    timeout_frozen_after = 8d

    # Specify the domain you want to be added to all unqualified addresses
    # here. An unqualified address is one that does not contain an "@" character
    # followed by a domain. For example, "caesar@rome.ex" is a fully qualified
    # address, but the string "caesar" (i.e. just a login name) is an unqualified
    # email address. Unqualified addresses are accepted only from local callers by
    # default. See the receiver_unqualified_{hosts,nets} options if you want
    [ This is the only occurrence ]
    -----------------------------------------------

    Bottom line: changes I'm making in WHM > Exim Configuration Editor are not being written into exim.conf.

    A permission problem on exim.conf perhaps?

    -rw-r--r-- 1 root root 33142 Oct 11 10:11 exim.conf
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yup, works fine for me too.

    Make sure you haven't chattr'd any exim files:

    lsattr /etc/exim*
     
  11. mgorovoy

    mgorovoy Member

    Joined:
    Mar 27, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NYC
    To thaw or not to thaw, that is the question...

    If the following settings are present in the exim.conf file,

    timeout_frozen_after = 4d
    ignore_bounce_errors_after = 1d


    what would be the correct setting for the auto_thaw option? Is it supposed to be in between the above two values, or equal to timeout_frozen_after value?
     
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Placement is irrelevant within that textarea in the Exim Configuration Editor. Why do you want to auto_thaw queued email?
     
  13. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    I have these values :

    auto_thaw = 6d
    ignore_bounce_errors_after = 7d
    timeout_frozen_after = 8d

    It seems too high eventhough they are default values. I wanted to change them in WHM but they are in the unchangeable section.

    If I change them in exim.conf through SSH, how do I sync the values back to WHM exim editor? I do not want to have 2 sections with different exim configuration.
     
  14. mgorovoy

    mgorovoy Member

    Joined:
    Mar 27, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NYC
    Perhaps I did not phrase my question correctly. I was not asking where it is supposed to be placed. What I meant is what value should be assigned to that setting? I know that by default auto_thaw is set to something like 6 days by cPanel. We would prefer to remove that option entirely. How would I do it via Advanced Configuration editor? Should we assign auto_thaw=0s or something to that effect?
     
  15. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    That was it (for us). Thanks chirpy!
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's not how it works. You should never ever change exim.conf itself. Put them in using the exim configuration editor and they will be correctly written to the generated exim.conf

    There's no need to set it. If you have set:

    timeout_frozen_after = 4d

    then frozen emails will be dropped after 4 days anyway.
     
  17. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    I have placed :
    In WHM exim editor but not sure if the value is reflected correctly cause I still see the default value by exim there and also my entries which I put in the top most box.
     
  18. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    It may interest others to know that an unexpected but welcome side-effect of the above settings taking effect was that Munin graphs for memory usage on our server show a much less turbulent memory use environment - smoother memory use graphs, much less ragged. I spotted this effect by chance, and since we didn't do anything on the server around the time the memory usage graphs got smoother, I can only put it down to these settings. So the existence of many (1K+) frozen and bounced message on the exim mail queue was having an detrimental effect on the server overall.
     
Loading...

Share This Page