> What I did when encountering a similar issue was to take one of the messages from INBOX that should have been moved elsewhere and use sieve-test on it: > > sieve-test -Tlevel=matching <sieve source file> <message file> > > That generates a lot of output as it goes through every line of the sieve file and shows the actual values that are used for the tests. However, it pointed out my problem quite clearly. >Thank you for this. Actually, after many hours of head-bashing, I discovered the problem. sieve doesn't work when you're just using telnet port 25 ! I was doing : ehlo test mail from:sender at example.com rcpt to:recip at example.com data Subject: hello world Hello World ! . With the above, sieve was simply sending everything to INBOX When I changed my methodology : ehlo test mail from:sender at example.com rcpt to:recip at example.com data From:<sender at example.com> To:<recip at example.com> Subject: hello world Hello World ! . It worked as expected.
On 2017-02-18, Ben <ben+dovecot at list-subs.com> wrote:> >> What I did when encountering a similar issue was to take one of the messages from INBOX that should have been moved elsewhere and use sieve-test on it: >> >> sieve-test -Tlevel=matching <sieve source file> <message file> >> >> That generates a lot of output as it goes through every line of the sieve file and shows the actual values that are used for the tests. However, it pointed out my problem quite clearly. >> > > Thank you for this. > > Actually, after many hours of head-bashing, I discovered the problem. > > sieve doesn't work when you're just using telnet port 25 ! > > I was doing : > ehlo test > mail from:sender at example.com > rcpt to:recip at example.com > data > Subject: hello world > Hello World ! > . > > With the above, sieve was simply sending everything to INBOX > > When I changed my methodology : > ehlo test > mail from:sender at example.com > rcpt to:recip at example.com > data > From:<sender at example.com> > To:<recip at example.com> > Subject: hello world > Hello World ! > . > > It worked as expected. >The first one works as expected too; your rule used "address" so it is correct that it didn't look at the envelope address. You want e.g. envelope "to" "foo at example.org"
>> Thank you for this. >> >> Actually, after many hours of head-bashing, I discovered the problem. >> >> sieve doesn't work when you're just using telnet port 25 ! >> >> I was doing : >> ehlo test >> mail from:sender at example.com >> rcpt to:recip at example.com >> data >> Subject: hello world >> Hello World ! >> . >> >> With the above, sieve was simply sending everything to INBOX >> >> When I changed my methodology : >> ehlo test >> mail from:sender at example.com >> rcpt to:recip at example.com >> data >> From:<sender at example.com> >> To:<recip at example.com> >> Subject: hello world >> Hello World ! >> . >> >> It worked as expected. >> > The first one works as expected too; your rule used "address" so it > is correct that it didn't look at the envelope address. You want e.g. > > envelope "to" "foo at example.org"Will take a look. Thanks !
Am 18.02.2017 um 17:44 schrieb Ben:>[ ... ]> Actually, after many hours of head-bashing, I discovered the problem. > > sieve doesn't work when you're just using telnet port 25 ! > > I was doing : > ehlo test > mail from:sender at example.com > rcpt to:recip at example.com > data > Subject: hello world > Hello World ! > . > > With the above, sieve was simply sending everything to INBOX > > When I changed my methodology : > ehlo test > mail from:sender at example.com > rcpt to:recip at example.com > data > From:<sender at example.com> > To:<recip at example.com> > Subject: hello world > Hello World ! > . > > It worked as expected.Just for the record: please don't use that invalid syntax. Alexander
Maybe Matching Threads
- Sieve not filtering
- Sieve not filtering
- Sieve not filtering
- Bug#255560: logcheck-database: More Postfix rules
- managesieve script 'redirect' fails @ "Error: sieve: ... aborted due to temporary failure; Error: smtp-server: ... failed: SSL_accept() failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number"; direct send OK ?