Re: [exim] Issues with headers_remove in router ::

Pàgina inicial
Delete this message
Reply to this message
Autor: Shamim Shahriar
Data:  
A: Jeremy Harris
CC: exim-users
Assumpte: Re: [exim] Issues with headers_remove in router ::
Hello Jeremy

Thank you for your reply. I tried that, and below is the modified
headers_remove section

  headers_remove = ${if or { { <{$spam_score_int}{1} } \
        { <{$spam_score_int}{${lookup mysql{select users.sa_tag * 10 from
users,domains \
        where localpart = '${quote_mysql::$local_part}' \
        and domain = '${quote_mysql::$domain}' \
        and users.on_spamassassin = 1 \
        and users.domain_id=domains.domain_id}{$value}fail}} } \
        { eq {0}{${lookup mysql{select users.sa_tag * 10 from users,domains
\
        where localpart = '${quote_mysql::$local_part}' \
        and domain = '${quote_mysql::$domain}' \
        and users.on_spamassassin = 0 \
        and users.domain_id=domains.domain_id}{$value}fail}}} \
        } {X-Spam-Score::X-Spam-Report} }




However, the problem persists. I am dumping the entire virtual_domain
router section for a better understanding, but you can see the error at the
end of the section.

Please note, the query on other areas seem to work fine with single colon,
not sure if that is for compatibility or just the headers_remove requires
special treatment.

Thanks again
Shah
---------------

05:10:23  9292 --------> virtual_domains router <--------
05:10:23  9292 local_part=postmaster domain=my.local.domain
05:10:23  9292 calling virtual_domains router
05:10:23  9292 rda_interpret (string): ${lookup mysql{select smtp from
users,domains where localpart = '${quote_mysql:$local_part}' and domain =
'${quote_mysql:$domain}' and domains.enabled = '1' and users.domain_id =
domains.domain_id}}
05:10:23  9292 expanding: $local_part
05:10:23  9292    result: postmaster
05:10:23  9292 expanding: $domain
05:10:23  9292    result: my.local.domain
05:10:23  9292 expanding: select smtp from users,domains where localpart =
'${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and
domains.enabled = '1' and users.domain_id = domains.domain_id
05:10:23  9292    result: select smtp from users,domains where localpart =
'postmaster' and domain = 'my.local.domain' and domains.enabled = '1' and
users.domain_id = domains.domain_id
05:10:23  9292 search_open: mysql "NULL"
05:10:23  9292   cached open
05:10:23  9292 search_find: file="NULL"
05:10:23  9292   key="select smtp from users,domains where localpart =
'postmaster' and domain = 'my.local.domain' and domains.enabled = '1' and
users.domain_id = domains.domain_id" partial=-1 affix=NULL starflags=0
05:10:23  9292 LRU list:
05:10:23  9292 internal_search_find: file="NULL"
05:10:23  9292   type=mysql key="select smtp from users,domains where
localpart = 'postmaster' and domain = 'my.local.domain' and domains.enabled
= '1' and users.domain_id = domains.domain_id"
05:10:23  9292 database lookup required for select smtp from users,domains
where localpart = 'postmaster' and domain = 'my.local.domain' and
domains.enabled = '1' and users.domain_id = domains.domain_id
05:10:23  9292 MySQL query: select smtp from users,domains where localpart
= 'postmaster' and domain = 'my.local.domain' and domains.enabled = '1' and
users.domain_id = domains.domain_id
05:10:23  9292 MYSQL using cached connection for
localhost:(/tmp/mysql.sock)/seedVexim/eximDBUser
05:10:23  9292 lookup yielded:
/RWs/home/vMails/localDomains/my.local.domain/postmaster/Maildir
05:10:23  9292 expanding: ${lookup mysql{select smtp from users,domains
where localpart = '${quote_mysql:$local_part}' and domain =
'${quote_mysql:$domain}' and domains.enabled = '1' and users.domain_id =
domains.domain_id}}
05:10:23  9292    result:
/RWs/home/vMails/localDomains/my.local.domain/postmaster/Maildir
05:10:23  9292 expanded:
/RWs/home/vMails/localDomains/my.local.domain/postmaster/Maildir
05:10:23  9292 file is not a filter file
05:10:23  9292 parse_forward_list:
/RWs/home/vMails/localDomains/my.local.domain/postmaster/Maildir
05:10:23  9292 extract item:
/RWs/home/vMails/localDomains/my.local.domain/postmaster/Maildir
05:10:23  9292 expanding: $spam_score_int
05:10:23  9292    result: 27
05:10:23  9292 expanding: $local_part
05:10:23  9292    result: postmaster
05:10:23  9292 expanding: $domain
05:10:23  9292    result: my.local.domain
05:10:23  9292 expanding: select users.sa_tag * 10 from users,domains where
localpart = '${quote_mysql:$local_part}' and domain =
'${quote_mysql:$domain}' and users.on_spamassassin = '1' and
users.domain_id=domains.domain_id
05:10:23  9292    result: select users.sa_tag * 10 from users,domains where
localpart = 'postmaster' and domain = 'my.local.domain' and
users.on_spamassassin = '1' and users.domain_id=domains.domain_id
05:10:23  9292 search_open: mysql "NULL"
05:10:23  9292   cached open
05:10:23  9292 search_find: file="NULL"
05:10:23  9292   key="select users.sa_tag * 10 from users,domains where
localpart = 'postmaster' and domain = 'my.local.domain' and
users.on_spamassassin = '1' and users.domain_id=domains.domain_id "
partial=-1 affix=NULL starflags=0
05:10:23  9292 LRU list:
05:10:23  9292 internal_search_find: file="NULL"
05:10:23  9292   type=mysql key="select users.sa_tag * 10 from
users,domains where localpart = 'postmaster' and domain = 'my.local.domain'
and users.on_spamassassin = '1' and users.domain_id=domains.domain_id "
05:10:23  9292 database lookup required for select users.sa_tag * 10 from
users,domains where localpart = 'postmaster' and domain = 'my.local.domain'
and users.on_spamassassin = '1' and users.domain_id=domains.domain_id
05:10:23  9292 MySQL query: select users.sa_tag * 10 from users,domains
where localpart = 'postmaster' and domain = 'my.local.domain' and
users.on_spamassassin = '1' and users.domain_id=domains.domain_id
05:10:23  9292 MYSQL using cached connection for
localhost:(/tmp/mysql.sock)/seedVexim/eximDBUser
05:10:23  9292 lookup yielded: 20
05:10:23  9292 expanding: $value
05:10:23  9292    result: 20
05:10:23  9292 expanding: ${lookup mysql{select users.sa_tag * 10 from
users,domains where localpart = '${quote_mysql:$local_part}' and domain =
'${quote_mysql:$domain}' and users.on_spamassassin = '1' and
users.domain_id=domains.domain_id }{$value}fail}
05:10:23  9292    result: 20
05:10:23  9292 condition: >{$spam_score_int}{${lookup mysql{select
users.sa_tag * 10 from users,domains where localpart =
'${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and
users.on_spamassassin = '1' and users.domain_id=domains.domain_id
}{$value}fail}}
05:10:23  9292    result: true
05:10:23  9292 expanding: X-Spam-Flag: YES\n
05:10:23  9292    result: X-Spam-Flag: YES
05:10:23  9292
05:10:23  9292 expanding:
05:10:23  9292    result:
05:10:23  9292 skipping: result is not used
05:10:23  9292 expanding: ${if >{$spam_score_int}{${lookup mysql{select
users.sa_tag * 10 from users,domains where localpart =
'${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and
users.on_spamassassin = '1' and users.domain_id=domains.domain_id
}{$value}fail}} {X-Spam-Flag: YES\n}{} }
05:10:23  9292    result: X-Spam-Flag: YES
05:10:23  9292
05:10:23  9292 expanding: $spam_score_int
05:10:23  9292    result: 27
05:10:23  9292 expanding: 1
05:10:23  9292    result: 1
05:10:23  9292 expanding: $spam_score_int
05:10:23  9292    result: 27
05:10:23  9292 failed to expand: select users.sa_tag * 10 from
users,domains where local
05:10:23  9292    error message: missing } at end of string
05:10:23  9292 failed to expand: ${lookup mysql{select users.sa_tag * 10
from users,domains where local
05:10:23  9292    error message: missing } at end of string
05:10:23  9292 failed to expand: ${if or { { <{$spam_score_int}{1} } {
<{$spam_score_int}{${lookup mysql{select users.sa_tag * 10 from
users,domains where local
05:10:23  9292    error message: missing } at end of string inside
"or{...}" condition
05:10:23  9292 virtual_domains router: defer for postmaster@???
05:10:23  9292   message: virtual_domains router failed to expand "${if or
{ { <{$spam_score_int}{1} } { <{$spam_score_int}{${lookup mysql{select
users.sa_tag * 10 from users,domains where localpart =
'${quote_mysql::$local_part}' and domain = '${quote_mysql::$domain}' and
users.on_spamassassin = 1 and
users.domain_id=domains.domain_id}{$value}fail}} } { eq {0}{${lookup
mysql{select users.sa_tag * 10 from users,domains where localpart =
'${quote_mysql::$local_part}' and domain = '${quote_mysql::$domain}' and
users.on_spamassassin = 0 and
users.domain_id=domains.domain_id}{$value}fail}}} }
{X-Spam-Score::X-Spam-Report} }": missing } at end of string inside
"or{...}" condition
05:10:23  9292 added retry item for R:postmaster@???: errno=-1
more_errno=0 flags=0
05:10:23  9292 post-process postmaster@??? (1)
05:10:23  9292 LOG: MAIN
05:10:23  9292   == postmaster@??? R=virtual_domains defer
(-1): Temporary internal error




On 5 September 2014 10:50, Jeremy Harris <jgh@???> wrote:

> On 04/09/14 23:35, Shamim Shahriar wrote:
> >  headers_remove = ${if or { { <{$spam_score_int}{1} } \
> >                { <{$spam_score_int}{${lookup mysql{select users.sa_tag *
> > 10 from users,domains \
> >                where localpart = '${quote_mysql:$local_part}' \
> >                and domain = '${quote_mysql:$domain}' \
> >                and users.on_spamassassin = '1' \
> >                and users.domain_id=domains.domain_id }{$value}fail}} } \
> >                { eq {0}{${lookup mysql{select users.sa_tag * 10 from
> > users,domains \
> >                where localpart = '${quote_mysql:$local_part}' \
> >                and domain = '${quote_mysql:$domain}' \
> >                and users.on_spamassassin = '0' \
> >                and users.domain_id=domains.domain_id}{$value}fail}}} \
> >                        } {X-Spam-Score::X-Spam-Report} }

>
> Double the colons. List items are now expanded separately.
> --
> Jeremy
>
>
>
> --
> ## 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/
>