0

I am looking to create some filters of different complexity for Apache James. My question is: How useful is James jSieve? What are benefits of using it? How current/actively-developed it is?

I already looked at the standard matcher & mailets. I tried and liked the custom matchers, e.g.:

import org.apache.mailet.GenericMatcher; 
import org.apache.mailet.Mail; 
import javax.mail.MessagingException; 
import java.util.Collection; 

public class oooMatcher extends GenericMatcher{


 public void init() throws javax.mail.MessagingException { }
 private String outOfOffice     = "out of office";
 private String autoReply   = "autoreply";

 @SuppressWarnings("rawtypes")
 public Collection match(Mail mail) {   
    try {           
        String subj = mail.getMessage().getSubject().toLowerCase();
        if (subj.contains(outOfOffice)||subj.contains(autoReply)){
            return mail.getRecipients();         
        } else {       
            return null;     
        }
    } catch (MessagingException e) {            
        e.printStackTrace();
        return null;
    }
  }
}

I am curious to know What would be jSieve analogy of the above code.

4

1 に答える 1

0

この時点で、jSieve は Java アプリケーション、特に James 用の Sieve スクリプトのインタープリター (プロセッサー) に過ぎないと思います。Sieve スクリプトの利点は、プラットフォームやツールに依存せず、さまざまなメール サーバーで使用できることです。

于 2013-10-01T18:33:56.283 に答える