Delay removal of frozen emails

shadowq

Verified User
Joined
Dec 5, 2010
Messages
91
Hello!

I would like to leave frozen emails for a couple weeks before being deleted. At them moment, it seems like 2 or 3 days? I found the option in "timeout_frozen_after" in /etc/exim.conf, which according to exim is how long it keeps frozen messages for (http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html). However, after changing it to 15d, restarting exim, directadmin, and everything else I can think of, it still appears to remove them after the default time.

Does anyone have any insight on this?

Thanks in advance,
Jarrod.
 
Why should you want to keep frozen mail that long?
Normally mail get's frozen when it can't be delivered. So if you want to have them for a longer time, you will have to increase the retry time. So I think you should have a look at your Retry Configuration in exim.conf (bottom of the conf).
 
Thank you for the reply Richard!

I know it seems odd that we'd like to keep mail that long. Most of the mail sent from our servers are sent from web applications, not client mail, as we generally use an external mail service for most clients. However, as DirectAdmin sets the return path of emails as [user]@[users_primary_domain], and as we generally use an external mail service, that email address rarely exists, hence the emails never bounce back. I've added an option to specify a user's return path, but would like to do so for particular clients that would actually benefit from the bounced emails. Rather than ensuring I check the mail queue every 2 days, I'd like the flexibility of doing so for a couple of weeks.

So are you suggesting that the frozen option..
Code:
# This option cancels (removes) frozen messages that are older than five days.
timeout_frozen_after = 15d
does nothing?

I've modified that retry configuration line to see if that helps, and restarted exim!

Thanks,
Jarrod.
 
I don't think that the timout_frozen_after setting does nothing. It should be working.
From exim:
timeout_frozen_after: keep frozen messages only so long
So your setting is correct.

But a message get's frozen after a bounce or a non-delivery. So I thought that the retry configuration might precede.
However... when I'm thinking again... if my thoughts about that are correct, that should only be the case the for the delivery failures, not for bounced messages. They should be kept for the 15d you setup. So I went looking for a solution.

I found that there is another setting for the bounced messages called "ignore_boucen_errors_after".
timeout_frozen_after = drop emails from the queue that are frozen (undeliverable) after X days
ignore_bounce_errors_after = drop bounce emails from undeliverable email after X days
So probably you might not need to change the retry configuration, just add this line:
Code:
ignore_bounce_errors_after = 15d
And reload/restart Exim.
 
Thanks again Richard, for volunteering your time to help!

I've changed
Code:
ignore_bounce_errors_after = 2d
to
Code:
ignore_bounce_errors_after = 15d
I've also restarted exim, and sent an email to a bogus email address with a bogus return path to insert a bounced email in to the mail queue.

I'll let you know how it goes. Thanks again!

Jarrod.
 
Thanks Richard. It appears to be working as assumed. The email has now been frozen for 67 hours.

So far so good.

Thanks,
Jarrod.
 
Back
Top