John Killian wrote:
Hi all,
ok, can someone tell me which header fields that the "Sender" function in sieve looks at ???
I've created a sieve rule to move a mail to a directory that looks like this : # rule:[File Message] if anyof (address :contains "Sender" "Dude") { fileinto "TestFolder"; }
Your script checks for:
- a header called "Sender" literally (which isn't in the posted header)
- expects it to contain a valid e-mail address that contains the string "Dude" (which is not true, when you actually meant to use "From": Dude is not part of the mail address)
And the emails headers look like this :
Received: (qmail 5811 invoked by uid 100); 28 Jul 2009 22:33:56 -0000 X-Sieve: Dovecot Sieve 0.1.9 Delivered-To: xxxxxx-xxxxxx@xxxxxx.com Received: (qmail 5581 invoked from network); 28 Jul 2009 22:33:53 -0000 Received: from unknown (HELO mx1.securemailscan.com) (209.132.1.198) by mda1.scaledsystems.com with SMTP; 28 Jul 2009 22:33:53 -0000 X-Envelope-From: xxxxx@yahoo.com X-Envelope-To: xxxxxx@xxxxxx.com Received: From web35801.mail.mud.yahoo.com (66.163.179.170) by mx1.securemailscan.com (MAILFOUNDRY) id uh1v8HvGEd6coQAw for xxxxxx@xxxxxx.com; Tue, 28 Jul 2009 22:33:52 -0000 (GMT) Received: (qmail 76116 invoked by uid 60001); 28 Jul 2009 22:33:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1248820432; bh=bMaME6CgqoU7EGtJwkX2i9rjL4ONpP79bbfuft4bEok=; h=Message-ID:X-YMail-OSG:Received:X-RocketSRV:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=as+pQdsUMeD/yiXAxceO3lYtDm/vCgjqDH1AS1OsfMfQITJV7YMRJSqBst1m4mHIgC0xyShetRIo6o3FEeLxDDOHYKUhy3V31MrS+0d7B+us4Nrjft7OZu3zVPIS87fDWoF6hM9dc9eVXTu4Kuj0a1bul0XwKIRwXqn+AfXepYg= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-RocketSRV:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=kHyfgMDzLWxu70JYhQk6KYifrtYSi7jV4T7UqqQ6XfSN+WZeTRlZ4fK6R+nb1ykwTjmp2pROJAPYgHooRPs3MaYMtx54f0+7IL8HjP0c2wqiYIy++6pFzc+mk8j+72OJMBcxMhDTPtV/i52Uu0bDEl5+DbU6QXrQhYbak6BdzLM=; Message-ID: 213398.63258.qm@web35801.mail.mud.yahoo.com X-YMail-OSG: nmd_HZwVM1lT6TNyXWr2RcbN36VCejKyF4bZMN8urulX03szfpVuJD36F652_focw.1y1PwSPvcfGlWkoBsq5kEb9H_R.HWV.kcpvFe1pZGC4oWcj6Cc4uO737j.52s0kwXmru.WZEdJi..tsbkjg.8f3y_Lc4wJRFORqhFHjMoKG17xhVM8_z1olhpu_FtyrOVvTuoqaapAk3ioUOGTyEYp52oHRPQAx9TuiKojStPmtmq0AkGjDMybhQeciqJSvFJcrF6KqdL5wEjBX4G1bGGXGD61RYzUaJNGMX8FQ.tJqPEKSI1vlBU- Received: from [76.176.154.181] by web35801.mail.mud.yahoo.com via HTTP; Tue, 28 Jul 2009 15:33:52 PDT X-RocketSRV: showStationery=1248820330364@dclient.mail.yahoo.com,1248820330363@dclient.mail.yahoo.com,1248820330362@dclient.mail.yahoo.com X-Mailer: YahooMailRC/1358.22 YahooMailWebService/0.7.289.15 Date: Tue, 28 Jul 2009 15:33:52 -0700 (PDT) From: Dude Crush xxxxxxx@yahoo.com Reply-To: Dude Crush xxxxxxx@yahoo.com Subject: test from dude 2 To: xxxxxxxx@xxxxxxxx.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-948431439-1248820432=:63258"
The correct version of the script would check the "From" header:
if header :contains "From" "Dude" { fileinto "foobar"; }
-- Regards, Tom