Re: [exim] 'Marking' queued messages from the command line?

Inizio della pagina
Delete this message
Reply to this message
Autore: Phil Pennock
Data:  
To: Chris Siebenmann
CC: exim-users
Oggetto: Re: [exim] 'Marking' queued messages from the command line?
On 2013-01-10 at 10:43 -0500, Chris Siebenmann wrote:
> What I would like to be able to do is to mark certain queued messages
> so that they can then bypass the anti-spam system (based on appropriate
> conditions in the applicable routers in exim.conf). Is there a way to do
> this apart from changing the destination addresses?


You can filter based on variables such as time-in-queue, so if the
message is never supposed to be in the queue for more than 15 minutes
before having been passed on through this server, then you can use:
condition = ${if <{$message_age}{900}}
on the router which invokes the anti-spam appliance. This assumes that
you always have enough queue-runners, etc etc.

It's crude but normally works. Alternatively:
condition = ${if or{{first_delivery}{<{$message_age}{900}}}}
will at least ensure one delivery attempt.

> In a related question: if Exim is stopped entirely, is it safe to
> directly edit a -H file to either add headers or add acl_c/acl_m
> variables? (Assuming that one correctly formats the new additions.)


`exim -Mf $msgid` and `exim -Mt $msgid` to free and thaw the message; as
long as you haven't turned on the `auto_thaw` option in the config, this
should be sufficient to make it safe to edit at your leisure.

And I think it should be safe to then add acl_* variables, while frozen.

If you can programmatically determine some attribute that causes your
safety system to choke (*sigh*) then you might fix up in a system-filter
first, or just use an ACL rule with "control = freeze" after an
appropriate condition; logwrite some term which identifies the reason
and have a log-tailer watch the logs for those messages and go
investigate those messages.

-Phil