Autor: John Jetmore Datum: To: exim-users Betreff: [Exim] removing headers from :fail:ed emails
Jens Vonderheide asked this same question on July 26, but didn't receive
an answer, so I thought I'd try since I seem to have come across the same
problem.
I use $acl_m? variables to keep track of some information (notably users'
spam filtering preferences) during ACL and local_scan. Since I don't have
access to these variables during routing, I added them to a custom header
I can ${extract from. The problem is that I have to make sure this header
is never seen by anyone. Among other things, it contains a list of all
recipients of the message which doesn't sit well. I was going to use
headers_remove on pretty much every way to get mail out of our system to
make sure of this. However, headers_remove doesn't work on explicitly
failed messages. I use the following (It's incomplete and bounces all
mail at this point, not just spam, but I'm still at the playing stage):
reject_spam:
driver = redirect
domains = dbmnz;CM_LD/db.config.db
verify = false
allow_fail
data = :fail: Possible Spam Detected
headers_remove = X-CCC-Routing-Info
When this generates a bounce, the failed message includes the
X-CCC-Routing-Info: header. This makes sense, I guess, based on my
reading. The header isn't supposed to be removed until transport, and the
failed message never really gets transported.
So is there a way to do this? I suppose I could pipe through a program to
get rid of it, but my edge servers do a lot of work and I'd like to keep
external programs to a minimum. I'm going to keep reading to find a
method for this, just thought I'd see if anyone had any quick ideas.
(Before anyone tells me I should just reject at SMTP time, I am doing that
where I can - this router is for messages that contain recipients who both
will and won't allow me to bounce spam. In that case I have to accept at
SMTP time and then generate a bounce message)