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.

Undeliverable messages staying in queue forever

Discussion in 'General Discussion' started by fugtruck, Apr 8, 2011.

  1. fugtruck

    fugtruck Member

    Joined:
    Apr 27, 2010
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I have messages sitting in the mail queue that are undeliverable for various reasons (usually a bad e-mail address). Some of these are bounced messages and others are neither bounced nor frozen.

    For the bounced messages, I have 'ignore_bounce_errors_after = 1d' in the Exim configuration file but they're not being dropped after 1 day.

    For the others, I tried adding 'ignore_errmsg_errors_after = 1d' to the Exim config file but got an error, 'main option "ignore_errmsg_errors_after" unknown'. So I suppose this option is not available in Exim v4.

    Any idea how I can get rid of these undeliverable messages after a set time?
     
  2. fugtruck

    fugtruck Member

    Joined:
    Apr 27, 2010
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Any suggestions on what I can do to fix this?
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I can provide a suggestion on how to clear them using a cron if you are willing to go that route. The following cron command path will run at 1:00am server time every day of the week and remove messages in the queue that are older than 2 days (172800 is the number of seconds in 2 days time). If you want it to be just one day, that would be 86400 seconds so you'd use rather than 172800 in the command. Multiple the number of days desired x 86400 to get any other interval.

    Code:
    0 1 * * * /usr/sbin/exiqgrep -o 172800 -i | /usr/bin/xargs exim -Mrm
    You'd place the above cron into /var/spool/cron/root or using crontab -e command in root SSH.

    As for why ignore_bounce_errors_after is not working, it might be due to what is stated here (taken from 14. Main configuration location):

    Possibly the setting time is too long and needs to be reduced to 12h or a lower value. I'm uncertain if you've also set auto_thaw and timeout_frozen_after values.
     
Loading...

Share This Page