com.hs.mail.sieve
Class Actions

java.lang.Object
  extended by com.hs.mail.sieve.Actions

public class Actions
extends Object


Method Summary
protected static void detectAndHandleLocalLooping(SieveMailAdapter aMail, String recipient)
          Detect and handle locally looping mail.
static void execute(org.apache.jsieve.mail.ActionFileInto anAction, SieveMailAdapter aMail, MailetContext aMailetContext)
           Executes the passed ActionFileInto.
static void execute(org.apache.jsieve.mail.ActionKeep anAction, SieveMailAdapter aMail, MailetContext aMailetContext)
           Executes the passed ActionKeep.
static void execute(org.apache.jsieve.mail.ActionRedirect anAction, SieveMailAdapter aMail, MailetContext aMailetContext)
          Method execute executes the passed ActionRedirect.
static void execute(org.apache.jsieve.mail.ActionReject anAction, SieveMailAdapter aMail, MailetContext aMailetContext)
           Method execute executes the passed ActionReject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

execute

public static void execute(org.apache.jsieve.mail.ActionFileInto anAction,
                           SieveMailAdapter aMail,
                           MailetContext aMailetContext)
                    throws javax.mail.MessagingException

Executes the passed ActionFileInto.

This implementation accepts any destination with the root of INBOX.

As the current POP3 server does not support sub-folders, the mail is stored in the INBOX for the recipient of the mail and the full intended destination added as a prefix to the message's subject.

When IMAP support is added to James, it will be possible to support sub-folders of INBOX fully.

Parameters:
anAction -
aMail -
aMailetContext -
Throws:
javax.mail.MessagingException

execute

public static void execute(org.apache.jsieve.mail.ActionKeep anAction,
                           SieveMailAdapter aMail,
                           MailetContext aMailetContext)
                    throws javax.mail.MessagingException

Executes the passed ActionKeep.

In this implementation, "keep" is equivalent to "fileinto" with a destination of "INBOX".

Parameters:
anAction -
aMail -
aMailetContext -
Throws:
javax.mail.MessagingException

execute

public static void execute(org.apache.jsieve.mail.ActionRedirect anAction,
                           SieveMailAdapter aMail,
                           MailetContext aMailetContext)
                    throws javax.mail.MessagingException
Method execute executes the passed ActionRedirect.

Parameters:
anAction -
aMail -
aMailetContext -
Throws:
javax.mail.MessagingException

execute

public static void execute(org.apache.jsieve.mail.ActionReject anAction,
                           SieveMailAdapter aMail,
                           MailetContext aMailetContext)
                    throws javax.mail.MessagingException

Method execute executes the passed ActionReject. It sends an RFC 2098 compliant reject MDN back to the sender.

Parameters:
anAction -
aMail -
aMailetContext -
Throws:
javax.mail.MessagingException

detectAndHandleLocalLooping

protected static void detectAndHandleLocalLooping(SieveMailAdapter aMail,
                                                  String recipient)
                                           throws javax.mail.MessagingException
Detect and handle locally looping mail. External loop detection is left to the MTA.

Parameters:
aMail -
aMailetContext -
anAttributeSuffix -
Throws:
javax.mail.MessagingException


Copyright © 2011. All Rights Reserved.