Sieve plus addressed mail filtering
Today I learned, that to filter incoming plus addressed mail (user+tag@…) I had to deviate from the documentation. There it reads:
if envelope :detail "to" "spam"{ fileinto "Spam"; }
Instead I had to write:
if address :is :detail "To" "tag"{ fileinto "Tagged"; }
Dovecot version is 2.2.13-1+bigmichi1~precise+1
-- peter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 29 Oct 2014, Peter Chiochetti wrote:
Today I learned, that to filter incoming plus addressed mail (user+tag@…) I had to deviate from the documentation. There it reads:
if envelope :detail "to" "spam"{
^^ does this quote miss ":is"?
fileinto "Spam"; }
Instead I had to write:
if address :is :detail "To" "tag"{ fileinto "Tagged"; }
it depends on your way, how to deliver message from MTA to Dovecot, if the envelope information is available at all. How do you do it?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBVFDgRXz1H7kL/d9rAQIzqggAmZmlsHkG0eY5n60cOBzzIDYM+t0L3d0H esHdP/yHI9uv07R9OPbn696uYXeKe0e0qLfTZtBm4a5GKAXaWbGcpFr8rBaYLbwm jKENlevb5MPO6AkNiETYDmpcZGeMRvhtU63jc9UVeFpRZkCg777Fc6mXWUJw0JOa S8vvM9CJZOfrInYFmvOjiB5RD/Dd6xk5m1JYy/EePAHRE8bt6tfhu12uyEyyX5Gw opJ2y602VTZemyNtRoxDH7hDIULs+5io4pItJWM3Y4TkCyYEQzUARo5bSdCYEHog rKJ7s0/F+WCKfm1aFsUnX60c/3aVDD4QfakbPDV8zPIwT6K8IPb+DQ== =Msv5 -----END PGP SIGNATURE-----
Am 2014-10-29 um 13:40 schrieb Steffen Kaiser:
On Wed, 29 Oct 2014, Peter Chiochetti wrote:
Today I learned, that to filter incoming plus addressed mail (user+tag@…) I had to deviate from the documentation. There it reads:
if envelope :detail "to" "spam"{
^^ does this quote miss ":is"?
fileinto "Spam"; }
This is literally taken from http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples#Plus_Addressed_mail_filte...
- adding the :is did not help, IIRC.
Instead I had to write:
if address :is :detail "To" "tag"{ fileinto "Tagged"; }
it depends on your way, how to deliver message from MTA to Dovecot, if the envelope information is available at all. How do you do it?
Mail is pushed to dovecot /deliver/ LDA from /fetchmail/ from a remote proxied dovecot IMAP.
-- peter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 29 Oct 2014, Peter Chiochetti wrote:
Instead I had to write:
if address :is :detail "To" "tag"{ fileinto "Tagged"; }
it depends on your way, how to deliver message from MTA to Dovecot, if the envelope information is available at all. How do you do it?
Mail is pushed to dovecot /deliver/ LDA from /fetchmail/ from a remote proxied dovecot IMAP.
"-a <address>: Original envelope recipient address (e.g. user+ext@domain), typically same as SMTP's RCPT TO: value. If not specified, it's taken from header specified by lda_original_recipient_header setting (v2.0.3+). If the header doesn't exist either, defaults to same as username. "
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBVFHsOXz1H7kL/d9rAQLVlAgAsEnlnP8L+/q/1ngw6QbCc/rmRGvrVE81 GgbwelerZ303hyA5QGBBkb9vhvjRuOUdAp1q9g4bJ1y8SdexWOdmWOCzk72Z7/PS isdRflM40uSusU4sUX+LN8n8VYEN0fJZ/6H1/CxZQdQsRu27bmhInlevAI8QI5td zDP6jrjTWBOH6SNlsN0H6dMdR7zuTAf1zsm3LOmoZE2VYk/FWORVVJJppv3cgtYe IS7koSW7G2x+cSQAw7c0ptuvAhABNLucTJ1rt77YNCE30Nna/gZHVFaJ1rnMaO/e hfsD6pLrabBIsgv+FyJFujtqPK3u649Wm+hv9Qc75dMi/a/BAFST2A== =QTjD -----END PGP SIGNATURE-----
participants (2)
-
Peter Chiochetti
-
Steffen Kaiser