RE: [exim] How can i delete mail older than X hours

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Peter Savitch
Data:  
Para: David Murphy
CC: exim-users
Assunto: RE: [exim] How can i delete mail older than X hours
Hi.

> I need to be able to delete mail older than 72 hours or 3 days. I

have
> deffer failures and other frozen type issue that can fillup my queue.

Im
> needing a command that can be run via cron to every 3 days remove any
> queue items older than 3 days old. Any ideas?


You can utilize Exim's own queue-runner (that is run by -qXXm) guided by
a special router like this:

junk_killer:
  driver = redirect
  no_verify
  domains = ...
  condition = ${if and\
      {\
        {queue_running}\
        {>{$message_age}{3d}}\
        }\
      } {yes}{no}\
    }
  allow_fail
  data = ":fail: message TTL expired"


Change the conditions to whatever you like, the key is ":fail:".
You can change that to ":blackhole:" to discard messages silently. Use
with caution.