public class SpamAssassinInvoker extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FLAG_MAIL_ATTRIBUTE_NAME
The mail attribute under which the flag get stored
|
static String |
STATUS_MAIL_ATTRIBUTE_NAME
The mail attribute under which the status get stored
|
Constructor and Description |
---|
SpamAssassinInvoker(String spamdHost,
int spamdPort)
Init the spamassassin invoker
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getHeadersAsAttribute()
Return the headers as attributes which spamd generates
|
String |
getHits()
Return the hits which was returned by spamd
|
String |
getRequiredHits()
Return the required hits
|
boolean |
scanMail(javax.mail.internet.MimeMessage message)
Scan a MimeMessage for spam by passing it to spamd.
|
public static final String STATUS_MAIL_ATTRIBUTE_NAME
public static final String FLAG_MAIL_ATTRIBUTE_NAME
public SpamAssassinInvoker(String spamdHost, int spamdPort)
spamdHost
- The host on which spamd runsspamdPort
- The port on which spamd listenpublic boolean scanMail(javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
message
- The MimeMessage to scanjavax.mail.MessagingException
- if an error on scanning is detectedpublic String getHits()
public String getRequiredHits()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.