Sieve mailet error
Mihai Zamfira <[email protected]>
| Newsgroups | gmane.comp.jakarta.james.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
im using a james 3.8 with cassandra and opensearch.
my “local-delivery” processor configuration looks like below .
<processor state="local-delivery" enableJmx="true">
<mailet match="All" class="VacationMailet">
<onMailetException>ignore</onMailetException>
</mailet>
<mailet match="All" class="Sieve">
<onMailetException>ignore</onMailetException>
</mailet>
<mailet match="All" class="AddDeliveredToHeader"/>
<mailet match="All" class="org.apache.james.jmap.mailet.filter.JMAPFiltering">
<onMailetException>ignore</onMailetException>
</mailet>
<mailet match="All" class="LocalDelivery"/>
</processor>
The problem appears when an email with 2 or more local recipients it’s received and Sieve it throw the following error "Invalid number of recipients - 2. Exactly 1 recipient is expected. Moreover, the email is received by the recipient and duplicated with another email in which the SIEVE error is specified
Any help is appreciated.
Below i added first lines from the error stack
09:23:37.239 [INFO ] o.a.j.s.SendMailHandler - Successfully spooled mail Mail1686464617103-df62f02b-fc93-45e0-901c-b5a206bc82af with messageId <[email protected]> from [email protected] on 79.138.136.47/79.138.136.47 for [[email protected], [email protected]]
09:23:37.239 [DEBUG] o.a.j.s.DataLineJamesMessageHookHandler - executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger@5f33b30e
09:23:37.239 [DEBUG] o.a.j.p.s.c.l.HookResultLogger - org.apache.james.smtpserver.SendMailHandler: result= (OK CONNECTED)
09:23:37.239 [DEBUG] o.a.j.s.DataLineJamesMessageHookHandler - executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor@571441c2
09:23:37.248 [DEBUG] o.a.j.m.i.JamesMailSpooler - ==== Begin processing mail Mail1686464617103-df62f02b-fc93-45e0-901c-b5a206bc82af ====
09:23:37.249 [DEBUG] o.a.j.m.l.AbstractStateCompositeProcessor - Call MailProcessor root
09:23:37.258 [DEBUG] o.a.j.m.l.AbstractStateCompositeProcessor - Call MailProcessor transport
09:23:37.283 [DEBUG] o.a.j.m.l.AbstractStateCompositeProcessor - Call MailProcessor local-delivery
09:23:37.289 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <tag>: Tag{value=87.241}
09:23:37.289 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <command>: SELECT
09:23:37.306 [DEBUG] o.a.j.m.c.GhostMailbox - Read mailbox succeeded
09:23:37.308 [DEBUG] o.a.j.m.s.StoreMailboxManager - Loaded mailbox #private:[email protected]:Sent Messages
09:23:37.314 [DEBUG] o.a.j.t.m.j.d.SieveExecutor - Evaluating org.apache.james.transport.mailets.jsieve.SieveMailAdapter Envelope From: [email protected] Envelope To: [email protected] Message ID: <[email protected]> against "<[email protected]>"
09:23:37.339 [INFO ] o.a.j.t.m.j.SieveMailAdapter - Executing action: Action: org.apache.jsieve.mail.ActionKeep
09:23:37.340 [ERROR] o.a.j.SieveFactory - Evaluation failed.
javax.mail.MessagingException: Invalid number of recipients - 2. Exactly 1 recipient is expected.
at org.apache.james.transport.mailets.jsieve.ActionUtils.getSoleRecipient(ActionUtils.java:52)
at org.apache.james.transport.mailets.jsieve.FileIntoAction.execute(FileIntoAction.java:76)
at org.apache.james.transport.mailets.jsieve.KeepAction.execute(KeepAction.java:63)
at org.apache.james.transport.mailets.jsieve.KeepAction.execute(KeepAction.java:42)
at org.apache.james.transport.mailets.jsieve.ActionDispatcher.execute(ActionDispatcher.java:70)
at org.apache.james.transport.mailets.jsieve.SieveMailAdapter.executeActions(SieveMailAdapter.java:160)
... 97 common frames omitted
Wrapped by: org.apache.jsieve.exception.SieveException: javax.mail.MessagingException: Invalid number of recipients - 2. Exactly 1 recipient is expected.
at org.apache.james.transport.mailets.jsieve.SieveMailAdapter.executeActions(SieveMailAdapter.java:162)
at org.apache.jsieve.SieveFactory.evaluate(SieveFactory.java:165)
at org.apache.james.transport.mailets.jsieve.delivery.SieveExecutor.sieveMessageEvaluate(SieveExecutor.java:138)
at org.apache.james.transport.mailets.jsieve.delivery.SieveExecutor.sieveMessage(SieveExecutor.java:118)
at org.apache.james.transport.mailets.jsieve.delivery.SieveExecutor.execute(SieveExecutor.java:112)
at org.apache.james.transport.mailets.Sieve.service(Sieve.java:71)
at org.apache.james.mailetcontainer.impl.ProcessorImpl.process(ProcessorImpl.java:81)
at com.github.fge.lambdas.consumers.ConsumerChainer.lambda$sneakyThrow$9(ConsumerChainer.java:73)