You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Tellier Benoit (JIRA)" <se...@james.apache.org> on 2016/01/05 10:02:39 UTC

[jira] [Commented] (JSIEVE-94) Nullpointer in SieveMailAdapter#post()

    [ https://issues.apache.org/jira/browse/JSIEVE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082666#comment-15082666 ] 

Tellier Benoit commented on JSIEVE-94:
--------------------------------------

The RFC-3028 that define the SIEVE language is outdated by the RFC-5228.

A look at RFC-5228 section 14 [shows](https://tools.ietf.org/html/rfc5228#section-14) :

```
Removed reject extension (will be specified in a separate RFC)
```

This rfc is [RFC-5429](https://tools.ietf.org/html/rfc5429)

We need to implement the reject extension as defined in the RFC-5429. As part of this work, I will write unit tests for this extension (see org.apache.james.transport.mailets.delivery.SieveMailetTest ). I will add a test for the behavior you describde.

> Nullpointer in SieveMailAdapter#post()
> --------------------------------------
>
>                 Key: JSIEVE-94
>                 URL: https://issues.apache.org/jira/browse/JSIEVE-94
>             Project: James jSieve
>          Issue Type: Bug
>          Components: JSieve (Main)
>    Affects Versions: 0.5
>            Reporter: Eike Kettner
>
> I've got a NPE when using the reject action with a simple sieve script:
> require ["reject"];
> if header :matches "From" ["*john@*"] {
>   reject "Don't want your mail.";
> }
> The class `SieveMailAdapter` implements the `post()` Method declared in `ActionContext`. The method's api doc says, that the `sender` argument may be null. In that respect the line 134 in `RejectAction` is ok, since it passes `null` to the `post()` method. The implementation of that method however, delegates this null argument to the `sendMail()` method of `MailetContext` (`JamesMailetContext` l.413). The api doc here does not tell whether null is allowed or not, but if sender is null, it would fail in `ToSenderFolder#doService()` (l.90). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org