| org.apache.james.transport.mailets.AbstractRedirect org.apache.james.transport.mailets.AbstractNotify
All known Subclasses: org.apache.james.transport.mailets.Bounce, org.apache.james.transport.mailets.NotifyPostmaster, org.apache.james.transport.mailets.NotifySender, org.apache.james.transport.mailets.DSNBounce,
AbstractNotify | abstract public class AbstractNotify extends AbstractRedirect (Code) | | Abstract mailet providing configurable notification services.
This mailet can be subclassed to make authoring notification mailets simple.
Provides the following functionalities to all notification subclasses:
- A common notification message layout.
- A sender of the notification message can optionally be specified.
If one is not specified, the postmaster's address will be used.
- A notice text can be specified, and in such case will be inserted into the
notification inline text.
- If the notified message has an "error message" set, it will be inserted into the
notification inline text. If the
attachStackTrace init parameter
is set to true, such error message will be attached to the notification message.
- The notified messages are attached in their entirety (headers and
content) and the resulting MIME part type is "message/rfc822".
- Supports by default the
passThrough init parameter (true if missing).
Sample configuration common to all notification mailet subclasses:
<mailet match="All" class="a notification mailet">
<sender>an address or postmaster or sender or unaltered, default=postmaster</sender>
<attachError>true or false, default=false</attachError>
<message>notice attached to the original message text (optional)</message>
<prefix>optional subject prefix prepended to the original message</prefix>
<inline>see
Redirect , default=none</inline>
<attachment>see
Redirect , default=message</attachment>
<passThrough>true or false, default=true</passThrough>
<fakeDomainCheck>true or false, default=true</fakeDomainCheck>
<debug>true or false, default=false</debug>
</mailet>
notice and senderAddress can be used instead of
message and sender; such names are kept for backward compatibility.
version: CVS $Revision: 494012 $ $Date: 2007-01-08 11:23:58 +0100 (Mo, 08 Jan 2007) $ since: 2.2.0 |
getAttachmentType | protected int getAttachmentType() throws MessagingException(Code) | | the attachment init parameter, or MESSAGE if missing |
getInLineType | protected int getInLineType() throws MessagingException(Code) | | the inline init parameter, or NONE if missing |
getMessage | protected String getMessage()(Code) | | the notice init parameter,or the message init parameter if missing,or a default string if both are missing |
getMessage | protected String getMessage(Mail originalMail) throws MessagingException(Code) | | the full message to append, built from the Mail object |
getPassThrough | protected boolean getPassThrough() throws MessagingException(Code) | | the passThrough init parameter, or true if missing |
getRecipients | abstract protected Collection getRecipients() throws MessagingException(Code) | | |
getReplyTo | protected MailAddress getReplyTo() throws MessagingException(Code) | | SpecialAddress.NULL , that will remove the "ReplyTo:" header |
getSender | protected MailAddress getSender() throws MessagingException(Code) | | the value of the sendingAddress init parameter,or the value of the sender init parameter if missing,or the postmaster address if both are missing the sendingAddress init parameteror the sender init parameteror the postmaster address if both are missing;possible special addresses returned areSpecialAddress.SENDER and SpecialAddress.UNALTERED |
getSubject | protected String getSubject() throws MessagingException(Code) | | null |
getSubjectPrefix | protected String getSubjectPrefix()(Code) | | the prefix init parameter or "Re:" if missing |
getTo | protected InternetAddress[] getTo() throws MessagingException(Code) | | null |
isReply | protected boolean isReply()(Code) | | true |
setSubjectPrefix | protected void setSubjectPrefix(Mail newMail, String subjectPrefix, Mail originalMail) throws MessagingException(Code) | | Builds the subject of newMail appending the subject
of originalMail to subjectPrefix, but avoiding a duplicate.
|
Methods inherited from org.apache.james.transport.mailets.AbstractRedirect | protected boolean attachError() throws MessagingException(Code)(Java Doc) protected boolean attachError(Mail originalMail) throws MessagingException(Code)(Java Doc) protected void buildAlteredMessage(Mail newMail, Mail originalMail) throws MessagingException(Code)(Java Doc) public static void changeSubject(MimeMessage message, String newValue) throws MessagingException(Code)(Java Doc) protected String[] getAllowedInitParameters()(Code)(Java Doc) protected int getAttachmentType() throws MessagingException(Code)(Java Doc) protected int getAttachmentType(Mail originalMail) throws MessagingException(Code)(Java Doc) protected boolean getFakeDomainCheck() throws MessagingException(Code)(Java Doc) protected boolean getFakeDomainCheck(Mail originalMail) throws MessagingException(Code)(Java Doc) protected int getInLineType() throws MessagingException(Code)(Java Doc) protected int getInLineType(Mail originalMail) throws MessagingException(Code)(Java Doc) protected String getMessage() throws MessagingException(Code)(Java Doc) protected String getMessage(Mail originalMail) throws MessagingException(Code)(Java Doc) protected String getMessageHeaders(MimeMessage message) throws MessagingException(Code)(Java Doc) protected boolean getPassThrough() throws MessagingException(Code)(Java Doc) protected boolean getPassThrough(Mail originalMail) throws MessagingException(Code)(Java Doc) protected Collection getRecipients() throws MessagingException(Code)(Java Doc) protected Collection getRecipients(Mail originalMail) throws MessagingException(Code)(Java Doc) protected MailAddress getReplyTo() throws MessagingException(Code)(Java Doc) protected MailAddress getReplyTo(Mail originalMail) throws MessagingException(Code)(Java Doc) protected MailAddress getReversePath() throws MessagingException(Code)(Java Doc) protected MailAddress getReversePath(Mail originalMail) throws MessagingException(Code)(Java Doc) protected MailAddress getSender() throws MessagingException(Code)(Java Doc) protected MailAddress getSender(Mail originalMail) throws MessagingException(Code)(Java Doc) final protected MailAddress getSpecialAddress(String addressString, String[] allowedSpecials) throws MessagingException(Code)(Java Doc) protected String getSubject() throws MessagingException(Code)(Java Doc) protected String getSubject(Mail originalMail) throws MessagingException(Code)(Java Doc) protected String getSubjectPrefix() throws MessagingException(Code)(Java Doc) protected String getSubjectPrefix(Mail originalMail) throws MessagingException(Code)(Java Doc) protected InternetAddress[] getTo() throws MessagingException(Code)(Java Doc) protected InternetAddress[] getTo(Mail originalMail) throws MessagingException(Code)(Java Doc) protected int getTypeCode(String param)(Code)(Java Doc) public void init() throws MessagingException(Code)(Java Doc) protected boolean isReply() throws MessagingException(Code)(Java Doc) protected boolean isReply(Mail originalMail) throws MessagingException(Code)(Java Doc) protected boolean isStatic()(Code)(Java Doc) protected Collection replaceInternetAddresses(Mail mail, Collection list) throws MessagingException(Code)(Java Doc) protected Collection replaceMailAddresses(Mail mail, Collection list)(Code)(Java Doc) final protected boolean senderDomainIsValid(Mail mail) throws MessagingException(Code)(Java Doc) public void service(Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setIsReply(Mail newMail, boolean isReply, Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setRecipients(Mail newMail, Collection recipients, Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setReplyTo(Mail newMail, MailAddress replyTo, Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setReversePath(MailImpl newMail, MailAddress reversePath, Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setSender(Mail newMail, MailAddress sender, Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setSubjectPrefix(Mail newMail, String subjectPrefix, Mail originalMail) throws MessagingException(Code)(Java Doc) protected void setTo(Mail newMail, InternetAddress[] to, Mail originalMail) throws MessagingException(Code)(Java Doc)
|
|
|