For a bit more detail the actual header looks like this:
--
X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='BODY_SIZE_10_99
0, __CT 0, __CTE 0, __CT_TEXT
_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0,
__MIME_VERSION 0, __SANE_MSGID 0'
On 7-Sep-07, at 10:41 AM, Darren Jacobs wrote:
> Were running 4.63 from freebsd ports.
>
> Using the '-d' switch I get:
>
> ==
> bash-2.05b# exim -bem /homes/dhj/test '${extract{Probability}{$h_X-
> PerlMx-Spam:}}'
> /homes/dhj/test
>
> bash-2.05b# exim -d -bem /homes/dhj/test '${extract{Probability}
> {$h_X-PerlMx-Spam:}}'
> Exim version 4.63 (FreeBSD 6.2) uid=0 gid=0 pid=358 D=fbb95cfd
> Probably Berkeley DB version 1.8x (native mode)
> Support for: crypteq iconv() IPv6 use_setclassresources PAM Perl
> OpenSSL Content_Scanning Old_Demime
> Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
> dnsdb dsearch nis nis0 passwd
> Authenticators: cram_md5 plaintext spa
> Routers: accept dnslookup ipliteral manualroute queryprogram redirect
> Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> Fixed never_users: 0
> Size of off_t: 8
> changed uid/gid: -C, -D, -be or -bf forces real uid
> uid=0 gid=0 pid=358
> auxiliary group list: 0 0 5
> seeking password data for user "mailnull": using cached result
> getpwnam() succeeded uid=26 gid=26
> seeking password data for user "root": cache not available
> getpwnam() succeeded uid=0 gid=0
> configuration file is /usr/local/etc/exim/configure
> log selectors = ffffffff 7ffdffff
> trusted user
> admin user
> seeking password data for user "mailnull": cache not available
> getpwnam() succeeded uid=26 gid=26
> originator: uid=0 gid=0 login=root name=Charlie Root
> sender address = root@???
> /homes/dhj/test
>
> search_tidyup called
> >>>>>>>>>>>>>>>> Exim pid=358 terminating with rc=0 >>>>>>>>>>>>>>>>
>
> =====
>
>
> Running 'exim -bem /dev/null' gives the following:
>
> ===
> bash-2.05b# exim -bem /dev/null
> /dev/null
> bash-2.05b#
> ===
>
>
> Darren.....
>
>
>
>
> On 7-Sep-07, at 4:45 AM, Philip Hazel wrote:
>
>> On Thu, 6 Sep 2007, Darren Jacobs wrote:
>>
>>> I'm trying to test a variable expansion which is suppose to pull the
>>> value for 'Probability=<some number>%' that is located in a header
>>> called X-PerlMX-Spam.
>>>
>>> I have a test email message located in a file called 'test'. I try
>>> calling the following:
>>>
>>> --
>>> exim -bem /homes/dhj/test '${extract{Probability}{$h_X-PerlMx-
>>> Spam:}}'
>>> --
>>>
>>> in the hopes that it will spit out the value of the Probability key.
>>> Unfortunately all its doing is spitting out the file path that I fed
>>> it. That is, its spits out '/homes/dhj/test'.
>>>
>>> Any suggestions as to what's wrong here?
>>
>> Which release of Exim? Have you tried with -d to see debugging
>> output?
>> What does "exim -bem /dev/null" say?
>>
>> --
>> Philip Hazel University of Cambridge Computing Service
>> Get the Exim 4 book: http://www.uit.co.uk/exim-book
>