[Dovecot] sieve multi-line parser bug
Dear sirs
Thank you and congratulations for creating Dovecot.
When a message header is split along several lines, it seems only the first one is parsed by sieve.
The following header:
From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?= =?iso-8859-1?Q?rvi=E7o=20de=20Cotia=20e=20Regi=E3o=2E?=" newsletter@cotiatododia.com.br
was not discarded by the following rule (when it should have been due to "cotiatododia"):
if anyof (header :contains ["From", "Reply-To", "To", "Cc"] ["cotiatododia", "ganhedinheiro.com", "1000deaths.com", "ione.correia", "nsbezerra", "estudenoexterior.com", "pestana@mauriciopestana.com.br", "institutojairmoura2@gmail.com", "webmaster@ie.org.br", "jahgor@jahgor.com.br", "marketing@mirostur.com.br"], header :contains "Subject" "E ai!, Essa voce Tem que Ver!") { discard; }
Thank you, Dennis
On Tue, 2008-10-07 at 14:38 -0300, info wrote:
When a message header is split along several lines, it seems only the first one is parsed by sieve.
The following header:
From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?= =?iso-8859-1?Q?rvi=E7o=20de=20Cotia=20e=20Regi=E3o=2E?=" newsletter@cotiatododia.com.br
Is that really correct? Was there no space or tab before the "=?iso.. ? Or was the line just accidentally split when sending the mail? If the above really is correct, then the header is broken and Dovecot is doing the right thing..
Hello Timo,
Thanks for the reply
It was accidentally split when sending the mail. The actual lines are
only 2:
- From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?=
- =?iso-8859-1?Q?rvi=E7o=20de=20Cotia=20e=20Regi=E3o=2E?=" newsletter@cotiatododia.com.br
(also attached)
Timo Sirainen wrote:
On Tue, 2008-10-07 at 14:38 -0300, info wrote:
When a message header is split along several lines, it seems only the first one is parsed by sieve.
The following header:
From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?= =?iso-8859-1?Q?rvi=E7o=20de=20Cotia=20e=20Regi=E3o=2E?=" newsletter@cotiatododia.com.br
Is that really correct? Was there no space or tab before the "=?iso.. ? Or was the line just accidentally split when sending the mail? If the above really is correct, then the header is broken and Dovecot is doing the right thing..
From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?= =?iso-8859-1?Q?rvi=E7o=20de=20Cotia=20e=20Regi=E3o=2E?=" newsletter@cotiatododia.com.br
On Wed, 2008-10-08 at 07:29 -0300, info wrote:
Hello Timo,
Thanks for the reply
It was accidentally split when sending the mail. The actual lines are
only 2:
- From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?=
OK, Cotiatododia is already in the first line, so the problem isn't about reading multi-line. What Dovecot version do you use?
"Cotiatododia" (with upper case C) is in the first line but "cotiatododia" (lower case) is only on the second one.
My rule is case sensitive (as far as I know):
if anyof (header :contains ["From", "Reply-To", "To", "Cc"] ["cotiatododia", "ganhedinheiro.com", "1000deaths.com", "ione.correia", "nsbezerra", "estudenoexterior.com", "pestana@mauriciopestana.com.br", "institutojairmoura2@gmail.com", "webmaster@ie.org.br", "jahgor@jahgor.com.br", "marketing@mirostur.com.br"], header :contains "Subject" "E ai!, Essa voce Tem que Ver!") { discard; }
I'm using version 1.1.3
Best Regards, Dennis
Timo Sirainen wrote:
On Wed, 2008-10-08 at 07:29 -0300, info wrote:
Hello Timo,
Thanks for the reply
It was accidentally split when sending the mail. The actual lines are
only 2:
- From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?=
OK, Cotiatododia is already in the first line, so the problem isn't about reading multi-line. What Dovecot version do you use?
I'm sorry it is my mistake
I forgot to add a "stop". There was another rule at the bottom of my script:
if allof (header :contains "X-Spam-Flag" "YES") {
fileinto "Junk";
}
which overruled the first
I apologize for taking your time.
Sincerely, Dennis
"Cotiatododia" (with upper case C) is in the first line but "cotiatododia" (lower case) is only on the second one.
My rule is case sensitive (as far as I know):
if anyof (header :contains ["From", "Reply-To", "To", "Cc"] ["cotiatododia", "ganhedinheiro.com", "1000deaths.com", "ione.correia", "nsbezerra", "estudenoexterior.com", "pestana@mauriciopestana.com.br", "institutojairmoura2@gmail.com", "webmaster@ie.org.br", "jahgor@jahgor.com.br", "marketing@mirostur.com.br"], header :contains "Subject" "E ai!, Essa voce Tem que Ver!") { discard; }
I'm using version 1.1.3
Best Regards, Dennis
Timo Sirainen wrote:
On Wed, 2008-10-08 at 07:29 -0300, info wrote:
Hello Timo,
Thanks for the reply
It was accidentally split when sending the mail. The actual lines are
only 2:
- From: "=?iso-8859-1?Q?Cotiatododia=20-=20O=20Jornal=20de=20Not=EDcias=20a=20Se?=
OK, Cotiatododia is already in the first line, so the problem isn't about reading multi-line. What Dovecot version do you use?
participants (2)
-
info
-
Timo Sirainen