Re: [exim] Redeliver saved message to Envelope-To?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marc Sherman
Datum:  
To: exim-users
Betreff: Re: [exim] Redeliver saved message to Envelope-To?
Marc Sherman wrote:
> I'm quarantining all spam sent to my system. Occasionally I find a
> false positive. I'd like to write a script to automatically deliver
> those messages to the original recipient, listed in the Envelope-To
> header in the quarantined message. Is there a way to do this from the
> command line with exim?


Since no-one had any ideas, I'll take a crack at something myself. Is
something like this likely to work?

exim4 -bm _redeliver-false-positive_@??? -oi < quarantined-msg

along with the following router:

redeliver_false_positive:
   driver = redirect
   domains = projectile.ca
   local_parts = _redeliver-false-positive_
   condition = ${if and{{!def:sender_host_address}
                        {={$caller_uid}{0}}
                        {def:h_Envelope-to}}{yes}{no}}
   data = ${address:$h_Envelope-to}
   headers_add = X-Projectile-Redelivered: $tod_full


The condition ensures that this router only works when called locally by
root, and the message must have an envelope-to header already in it.

I'd appreciate any comments on this idea. Thanks,
- Marc