[Exim] Some headers from ACL warn statements not available i…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Martijn Grendelman
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Some headers from ACL warn statements not available in system filter? (2nd attempt)
Hi,

Sorry, please ignore my previous mail, it got sent prematurely by accident
:-(

I am trying to set up Subject rewriting with exiscan-acl and a system
filter.

My ACL setup looks like this:

# Put a spam-score header in all messages
warn message = X-Spam-Score: $spam_score ($spam_bar)
       condition = ${if <{$message_size}{80k}{1}{0}}
       spam = nobody:true
# Put a report in identified spam messages, global threshold is 5.0
  warn message = X-Spam-Report: $spam_report\n\
                 X-Spam-Flag: YES\n\
                 X-New-Subject: [SPAM: $spam_score] $h_Subject
       condition = ${if <{$message_size}{80k}{1}{0}}
       spam = nobody


So, if SA thinks the message is spam, a spam-report, a X-Spam-Flag header
and a new subject get inserted into the message. This works, the headers
get added just fine.

I have also set up a system filter, that checks for a "X-New-Subject"
header, and if this is present, removes the Subject header and replaces it
by the new subject. This also works. When Exim receives a message !!with
theX-New- Subject header already present!!, the subject gets substituted
by it as it should.

However, if the header is added by the ACL above, the system filter
doesn't seem to see it. I added some logging commands to the system
filter, and an example message that I sent myself logged the following:

2004-03-15 17:30:49 Exim filter starting for 1B2uzI-0002ve-5E
2004-03-15 17:30:49 1B2uzI-0002ve-5E Subject: Fw: Viagra Xanax
2004-03-15 17:30:49 1B2uzI-0002ve-5E X-New-Subject:
2004-03-15 17:30:49 1B2uzI-0002ve-5E X-Spam-Score: 8.8 (++++++++)
2004-03-15 17:30:49 1B2uzI-0002ve-5E X-Spam-Flag:
2004-03-15 17:30:49 Exim filter ending for 1B2uzI-0002ve-5E

The X-Spam-Score header from the first part of the ACL works great; the
two (actually three) headers, from the second part are not visible in the
system filter.

logwrite "$tod_log $message_id X-Spam-Flag: $header_x-spam-flag:"

The $header_x-spam-flag variable just doesn't have the value I would
expect. Like I said, if the message already has the header when it
arrives, the value IS displayed in the log and the message definately does
have the right headers when it is delivered to my mailbox.

Any ideas? Could the cause be in the way I add the headers, in a muli-line
fasion with \n delimiters? Should that be \r\n or something?

Thanks,
Martijn.