On 9/19/21 21:24, j.emerlik wrote:> > Error: sieve: report-ham: line 1: the envelope extension cannot be used in this context (needs access to message envelope) >My guess would be that the envelope is not available because this is sieve running in IMAP, not during delivery. If the From: header is also good, maybe try if address :is "from" "*" { .. }
Den 19.09.2021 16:37, skrev Gedalya:> On 9/19/21 21:24, j.emerlik wrote: >> Error: sieve: report-ham: line 1: the envelope extension cannot be used in this context (needs access to message envelope) >> > My guess would be that the envelope is not available because this is sieve running in IMAP, not during delivery. > > If the From: header is also good, maybe try if address :is "from" "*" { .. } >Sounds right. There /is/ no envelope in? the on-disk copy of the mail. The "from" line at the very top of the mail is _usually_ tere, and is a copy of the envelope from, but it is not strictly defined to be anything? in particular.? I see you are trying to down-case the address-part of the from-line. Why not do that in the shell-script "sa-learn-ham.sh" ?
Yes, it's plugin imap_sieve enabled for IMAP protocol. There isn't no way to catch address "from" when moving messages between IMAP folders ? "If address :is "from" "*" { .. } - I have same error. niedz., 19 wrz 2021, 16:38 u?ytkownik Gedalya <gedalya at gedalya.net> napisa?:> On 9/19/21 21:24, j.emerlik wrote: > > > > Error: sieve: report-ham: line 1: the envelope extension cannot be used > in this context (needs access to message envelope) > > > My guess would be that the envelope is not available because this is sieve > running in IMAP, not during delivery. > > If the From: header is also good, maybe try if address :is "from" "*" { .. > } > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20210919/27e07a5e/attachment.html>