Re: [exim] Result repeated and contains a newline character …

Pàgina inicial
Delete this message
Reply to this message
Autor: Jaco Engelbrecht
Data:  
A: exim-users
Assumpte: Re: [exim] Result repeated and contains a newline character ?
Hi,

On Tue, Mar 27, 2007 at 04:24:04PM +0100, Philip Hazel wrote:
> On Tue, 27 Mar 2007, Jaco Engelbrecht wrote:
>
> > (Those were the line naumbers in vim, sorry. Let me reply using mutt instead...)
> >
> >   condition             = ${if and {\
> >                                      { or { { !eq {$header_X-Trend:}{clean} }\
> >                                             { !eq {$header_X-ClamAV:}{clean} }\
> >                                           }\
> >                                      }\
> >                     {< {${sg{$header_X-Spammark:}{\N(\d+)\.(\d+)\N}{\$1}}} {$ACL_SPAMMARK_THRESH} } \
> >                                      {match{${extract{1}{\:}{$ACL_SPAMMARK_FLAGS}}}{vINS}}\
> >                                    }\
> >                           }

> >
> > ACL_SPAMMARK_THRESH is the users' spam thresold (e.g. 96).
>
> But why have you written $ACL_SPAMMARK_THRESH?
>                          ^


That's how I access the value of ACL_SPAMMARK_THRESH?

--
# Spam thresold
ACL_SPAMMARK_THRESH = acl_m4

# Get the clients' filter settings.
   warn
      set acl_c0                  = ${extract{3}{\:}{$ACL_SPAMMARK_FLAGS}}
      set ACL_SPAMMARK_THRESH     = ${eval:$acl_c0}
      logwrite                    = Spam score thresold for user: $ACL_SPAMMARK_THRESH
--


> > ${sg{$header_X-Spammark:}{\N(\d+)\.(\d+)\N}{\$1}} should return e.g.
> > if given 100.00 => 100, 0.00 => 0, etc.
>
> In simple tests, with fixed values, it does.


Yup.

> > For the second problem, what's the best way to check for the existance
> > of the X-Spammark header, and setting it to 0 if it's not present?
>
> > I'm currently trying:
> >
> >         {< {${sg{${if def:h_X-Spammark:{$h_X-Spammark:}{0.00}}}{\N(\d+)\.(\d+)\N}{\$1}}} {$ACL_SPAMMARK_THRESH} } \

>
> if def is one solution.
>
> You still haven't said which release of Exim.


# exim4 -bV
Exim version 4.60 #1 built 08-Jun-2006 08:37:35
Copyright (c) University of Cambridge 2005
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005)
Support for: crypteq iconv() IPv6 PAM Perl GnuTLS move_frozen_messages Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Configuration file is /etc/exim4/exim4.conf

Jaco

--
bje@???