Mailing List Archive

Try to write an acl /acl_smtp_data to read header content spam
Dear all,

I try to write an acl in the section acl_smtp_data.
The purpose is to catch an entry in a specific spam header
:UNPARSEABLE_RELAY. If exim find that entry it should produce a log entry
like "unparseable entry found".
In did it like that
warn condition = ${if match{h_x-spam-status:}{"UNPARSEABLE_RELAY"}}
message= unparseable entry found!!

With no succuess. Is it possible to catch header entries within
all_smtp_data?

Greetings
Daniel










--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Try to write an acl /acl_smtp_data to read header content spam [ In reply to ]
On 23 Mar 2018, at 07:15, Mueller via Exim-users <exim-users@exim.org> wrote:
>
> warn condition = ${if match{h_x-spam-status:}{"UNPARSEABLE_RELAY"}}

That should be (untested):

warn condition = ${if match{$h_x-spam-status:}{\NUNPARSEABLE_RELAY\N}}

You need a leading $ on the header name, and the \N...\N markers to delimit the expression and prevent exim trying to expand anything in there.

Graeme
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/