org.apache.jsieve.mailet
Class SieveMailboxMailet

java.lang.Object
  extended by org.apache.mailet.base.GenericMailet
      extended by org.apache.jsieve.mailet.SieveMailboxMailet
All Implemented Interfaces:
org.apache.mailet.Mailet, org.apache.mailet.MailetConfig

public class SieveMailboxMailet
extends org.apache.mailet.base.GenericMailet

Executes a Sieve script against incoming mail. The script applied is based on the recipient.

Init Parameters

NameRequiredValuesRole
verboseNo - defaults to falsetrue (ignoring case) to enable, otherwise disable Enables verbose logging.


Constructor Summary
SieveMailboxMailet()
          For SDI
SieveMailboxMailet(Poster poster, ResourceLocator locator)
          CDI
 
Method Summary
 ResourceLocator getLocator()
           
 java.lang.String getMailetInfo()
          Return a string describing this mailet.
 Poster getPoster()
           
 void init()
           
 void init(org.apache.mailet.MailetConfig config)
           
 boolean isConsume()
          Is this mailet GHOSTing all mail it processes?
 boolean isInfoLoggingOn()
          Is informational logging turned on?
 boolean isQuiet()
          Is the logging for this mailet set to minimal?
 boolean isVerbose()
          Is this mailet logging verbosely? This property is set by init parameters.
 void service(org.apache.mailet.Mail mail)
          Delivers a mail to a local mailbox.
 void setConsume(boolean consume)
          Sets whether this mailet should GHOST all mail.
 void setLocator(ResourceLocator locator)
          For SDI
 void setPoster(Poster poster)
          For SDI
 void setQuiet(boolean quiet)
          Sets the logging for this mailet to minimal.
 void setVerbose(boolean verbose)
          Sets whether logging should be verbose for this mailet.
 void storeMail(org.apache.mailet.MailAddress sender, org.apache.mailet.MailAddress recipient, org.apache.mailet.Mail mail)
           
 
Methods inherited from class org.apache.mailet.base.GenericMailet
arrayToString, checkInitParameters, destroy, getInitParameter, getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SieveMailboxMailet

public SieveMailboxMailet()
For SDI


SieveMailboxMailet

public SieveMailboxMailet(Poster poster,
                          ResourceLocator locator)
CDI

Parameters:
poster - not null
Method Detail

getLocator

public ResourceLocator getLocator()

setLocator

public void setLocator(ResourceLocator locator)
For SDI

Parameters:
locator - not null

getPoster

public Poster getPoster()

setPoster

public void setPoster(Poster poster)
For SDI

Parameters:
poster - not null

isConsume

public boolean isConsume()
Is this mailet GHOSTing all mail it processes?

Returns:
true when mailet consumes all mail, false otherwise

setConsume

public void setConsume(boolean consume)
Sets whether this mailet should GHOST all mail.

Parameters:
consume - true when the mailet should consume all mail, false otherwise

isVerbose

public boolean isVerbose()
Is this mailet logging verbosely? This property is set by init parameters.

Returns:
true if logging should be verbose, false otherwise

setVerbose

public void setVerbose(boolean verbose)
Sets whether logging should be verbose for this mailet. This property is set by init parameters. This setting overrides isQuiet().

Parameters:
verbose - true when logging should be verbose, false otherwise

isQuiet

public boolean isQuiet()
Is the logging for this mailet set to minimal?

Returns:
true

setQuiet

public void setQuiet(boolean quiet)
Sets the logging for this mailet to minimal. This is overriden by setVerbose(boolean).

Parameters:
quiet - true for minimal logging, false otherwise

isInfoLoggingOn

public boolean isInfoLoggingOn()
Is informational logging turned on?

Returns:
true when minimal logging is off, false when logging is minimal

init

public void init(org.apache.mailet.MailetConfig config)
          throws javax.mail.MessagingException
Specified by:
init in interface org.apache.mailet.Mailet
Overrides:
init in class org.apache.mailet.base.GenericMailet
Throws:
javax.mail.MessagingException

service

public void service(org.apache.mailet.Mail mail)
             throws javax.mail.MessagingException
Delivers a mail to a local mailbox.

Specified by:
service in interface org.apache.mailet.Mailet
Specified by:
service in class org.apache.mailet.base.GenericMailet
Parameters:
mail - the mail being processed
Throws:
javax.mail.MessagingException - if an error occurs while storing the mail

getMailetInfo

public java.lang.String getMailetInfo()
Return a string describing this mailet.

Specified by:
getMailetInfo in interface org.apache.mailet.Mailet
Overrides:
getMailetInfo in class org.apache.mailet.base.GenericMailet
Returns:
a string describing this mailet

storeMail

public void storeMail(org.apache.mailet.MailAddress sender,
                      org.apache.mailet.MailAddress recipient,
                      org.apache.mailet.Mail mail)
               throws javax.mail.MessagingException
Parameters:
sender -
recipient -
mail -
Throws:
javax.mail.MessagingException

init

public void init()
          throws javax.mail.MessagingException
Overrides:
init in class org.apache.mailet.base.GenericMailet
Throws:
javax.mail.MessagingException
See Also:
GenericMailet.init()


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.