[exim] $header_* not defined in router?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Carlo Wood
Date:  
À: exim-users
Sujet: [exim] $header_* not defined in router?
Hi,

I am trying to route mail as function of the existance of a header.
Because everything is failing so far, I am doing tests. My latest
test is:

spamtest:
  debug_print = "R: spamtest for $domain"
  domains = "${if exists{CONFDIR/hubbed_hosts}\
                   {partial-lsearch;CONFDIR/hubbed_hosts}\
              fail}"
  condition = ${if match {$h_To}{^.*@???} {1}}
  driver = manualroute
  same_domain_copy_routing = yes
  transport = remote_smtp
  route_data = ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}}



Where the test is the 'condition' line that I
picked up from http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20040223/msg00211.html

The result of this is:

failed to expand condition "${if match {$h_To}{^.*@???} {1}}" for spamtest router: missing 2nd string in {} after "match"

PS I deliberately left out the backslash in front of the ".com".

==============================================================================

I have tried a LOT of other ways to use/expand $h_*: and my conclusion
is that $header_ cannot be used in this router definition.

Can someone please help me?
How can I set a condition for this router that tests if the
header 'Resent-From: xyz' is set?

The following condition also fails:

condition = ${if def:header_To: {yes}{no}}

with as result:

checking "condition"
spamtest router skipped: condition failure

==============================================================================

Here is how I test this (faking a spam mail delivery)

exim -d -v -bnq -bs -oMa 201.53.35.228 -oMr smtp < ~carlo/spammail1 2> /tmp/output

Where ~carlo/spammail1 contains:

HELO 1wvy5i2
MAIL FROM: kbriggs_mu@???
RCPT TO: carlo@???
DATA
Return-path: <kbriggs_mu@???>
Envelope-to: carlo@???
Delivery-date: Sun, 01 Apr 2007 08:52:54 +0200
Message-ID: <000701c773e7$1ccfab80$439f2c33@???>
Reply-To: "Keisha Briggs" <kbriggs_mu@???>
From: "Keisha Briggs" <kbriggs_mu@???>
To: <carlo@???>
Subject: Ambien the sleep med!!
Date: Sat, 31 Mar 2007 18:51:26 -0400
MIME-Version: 1.0
Content-Type: text/plain;
        format=flowed;
        charset="windows-1250"
        reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-Antivirus: avast! (VPS 000729-2, 31/03/2007), Outbound message
X-Antivirus-Status: Clean
Status: RO
Content-Length: 149
Lines: 5
Resent-From: carlo@???


BODY OF MESSAGE (deleted because it might trigger spam filters)
.
QUIT



This mail is delivered correctly, so the problem doesn't seem to be
the way I run exim for this test. The problem is that I cannot seem
to print or test any header in the 'spamtest:' router.

--
Carlo Wood <carlo@???>