org.apache.james.fetchmail
Class MessageProcessor

java.lang.Object
  extended by org.apache.james.fetchmail.ProcessorAbstract
      extended by org.apache.james.fetchmail.MessageProcessor

public class MessageProcessor
extends ProcessorAbstract

Class MessageProcessor handles the delivery of MimeMessages to the James input spool.

Messages written to the input spool always have the following Mail Attributes set:

org.apache.james.fetchmail.taskName (java.lang.String)
The name of the fetch task that processed the message
org.apache.james.fetchmail.folderName (java.lang.String)
The name of the folder from which the message was fetched

Messages written to the input spool have the following Mail Attributes set if the corresponding condition is satisfied:

org.apache.james.fetchmail.isBlacklistedRecipient
The recipient is in the configured blacklist
org.apache.james.fetchmail.isMaxMessageSizeExceeded (java.lang.String)
The message size exceeds the configured limit. An empty message is written to the input spool. The Mail Attribute value is a String representing the size of the original message in bytes.
org.apache.james.fetchmail.isRecipientNotFound
The recipient could not be found. Delivery is to the configured recipient. See the discussion of delivery to a sole intended recipient below.
org.apache.james.fetchmail.isRemoteRecievedHeaderInvalid
The Receieved header at the index specified by parameter remoteReceivedHeaderIndex is invalid.
org.apache.james.fetchmail.isRemoteRecipient
The recipient is on a remote host
org.apache.james.fetchmail.isUserUndefined
The recipient is on a localhost but not defined to James
org.apache.james.fetchmail.isDefaultSenderLocalPart
The local part of the sender address could not be obtained. The default value has been used.
org.apache.james.fetchmail.isDefaultSenderDomainPart
The domain part of the sender address could not be obtained. The default value has been used.
org.apache.james.fetchmail.isDefaultRemoteAddress
The remote address could not be determined. The default value (localhost/127.0.0.1)has been used.

Configuration settings - see org.apache.james.fetchmail.ParsedConfiguration - control the messages that are written to the James input spool, those that are rejected and what happens to messages that are rejected.

Rejection processing is based on the following filters:

RejectRemoteRecipient
Rejects recipients on remote hosts
RejectBlacklistedRecipient
Rejects recipients configured in a blacklist
RejectUserUndefined
Rejects recipients on local hosts who are not defined as James users
RejectRecipientNotFound
See the discussion of delivery to a sole intended recipient below
RejectMaxMessageSizeExceeded
Rejects messages whose size exceeds the configured limit
RejectRemoteReceievedHeaderInvalid
Rejects messages whose Received header is invalid.

Rejection processing is intentionally limited to managing the status of the messages that are rejected on the server from which they were fetched. View it as a simple automation of the manual processing an end-user would perform through a mail client. Messages may be marked as seen or be deleted.

Further processing can be achieved by configuring to disable rejection for one or more filters. This enables Messages that would have been rejected to be written to the James input spool. The conditional Mail Attributes described above identify the filter states. The Matcher/Mailet chain can then be used to perform any further processing required, such as notifying the Postmaster and/or sender, marking the message for error processing, etc.

Note that in the case of a message exceeding the message size limit, the message that is written to the input spool has no content. This enables configuration of a mailet notifying the sender that their mail has not been delivered due to its size while maintaining the purpose of the filter which is to avoid injecting excessively large messages into the input spool.

Delivery is to a sole intended recipient. The recipient is determined in the following manner:

  1. If isIgnoreIntendedRecipient(), use the configured recipient
  2. If the Envelope contains a for: stanza, use the recipient in the stanza
  3. If the Message has a sole intended recipient, use this recipient
  4. If not rejectRecipientNotFound(), use the configured recipient

If a recipient cannot be determined after these steps, the message is rejected.

Every delivered message CURRENTLY has an "X-fetched-from" header added containing the name of the fetch task. Its primary uses are to detect bouncing mail and provide backwards compatibility with the fetchPop task that inserted this header to enable injected messages to be detected in the Matcher/Mailet chain. This header is DEPRECATED and WILL BE REMOVED in a future version of fetchmail. Use the Mail Attribute org.apache.james.fetchmail.taskName instead.

MessageProcessor is as agnostic as it can be about the format and contents of the messages it delivers. There are no RFCs that govern its behavior. The most releveant RFCs relate to the exchange of messages between MTA servers, but not POP3 or IMAP servers which are normally end-point servers and not expected to re-inject mail into MTAs. None the less, the intent is to conform to the 'spirit' of the RFCs. MessageProcessor relies on the MTA (James in this implementation) to manage and validate the injected mail just as it would when receiving mail from an upstream MTA.

The only correction applied by MessageProcessor is to correct a missing or partial sender address. If the sender address can not be obtained, the default local part and default domain part is added. If the sender domain part is absent, the default domain part is added.

Mail with corrections applied to the sender address will most likely pass Matcher tests on the sender that they might otherwise fail. The Mail Attributes org.apache.james.fetchmail.isDefaultSenderLocalPart and org.apache.james.fetchmail.isDefaultSenderDomainPart are added to the injected mail to enable such mail to be detected and processed accordingly.

The status of messages on the server from which they were fetched that cannot be injected into the input spool due to non-correctable errors is determined by the undeliverable configuration options.


Method Summary
protected  void addErrorMessages(Mail mail)
          Adds any required error messages to a Mail.
protected  void addMailAttributes(Mail aMail)
          Adds the mail attributes to a Mail.
protected  java.lang.Boolean computeMaxMessageSizeExceeded()
          Compute the maxMessageSizeExceeded.
protected  java.lang.String computeRemoteAddress()
          Answer the IP Address of the remote server for the message being processed.
protected  java.lang.String computeRemoteDomain()
          Method computeRemoteDomain answers a String that is the RFC2822 compliant "Received : from" domain extracted from the message being processed for the remote domain that sent the message.
protected  java.lang.String computeRemoteHostName()
          Answer the Canonical host name of the remote server for the message being processed.
protected  java.lang.Boolean computeRemoteReceivedHeaderInvalid()
          Computes the remoteReceivedHeaderInvalid.
protected  javax.mail.internet.MimeMessage createEmptyMessage()
          Method createEmptyMessage answers a new MimeMessage from the fetched message with the message contents removed.
protected  Mail createMail(javax.mail.internet.MimeMessage message, MailAddress recipient)
          Method createMail creates a new Mail.
protected  javax.mail.internet.MimeMessage createMessage()
          Method createMessage answers a new MimeMessage from the fetched message.
protected  java.lang.String getEnvelopeRecipient(javax.mail.internet.MimeMessage msg)
          Method getEnvelopeRecipient answers the recipient if found else null.
protected  MailAddress getIntendedRecipient()
          Method getIntendedRecipient answers the sole intended recipient else null.
protected  javax.mail.internet.MimeMessage getMessageIn()
          Returns the messageIn.
protected  java.lang.String getRemoteAddress()
          Returns the remoteAddress, lazily initialised as required.
protected  java.lang.String getRemoteDomain()
          Returns the remoteDomain, lazily initialised as required.
protected  java.lang.String getRemoteHostName()
          Returns the remoteHostName, lazily initialised as required.
static java.lang.String getRFC2822RECEIVEDHeaderFields()
          Returns the rFC2822RECEIVEDHeaderFields.
protected  MailAddress getSender()
           Method getSender answers a MailAddress for the sender.
protected  java.lang.StringBuffer getStatusReport(java.lang.String detailMsg)
          Answer a StringBuffer containing a message reflecting the current status of the message being processed.
protected  void handleBouncing(Mail mail)
          Method handleBouncing sets the Mail state to ERROR and delete from the message store.
protected  void handleMarkSeenNotPermanent()
          Handler for when the folder does not support the SEEN flag.
protected  void handleParseException(javax.mail.internet.ParseException ex)
          Method handleParseException.
protected  void handleUnknownHostException(java.net.UnknownHostException ex)
          Method handleUnknownHostException.
protected  boolean isBlacklistedRecipient()
          Returns the Blacklisted.
protected  boolean isBlacklistedRecipient(MailAddress recipient)
          Method isBlacklistedRecipient.
protected  boolean isBouncing()
          Check if this mail has been bouncing by counting the X-fetched-from headers for this task
protected  boolean isDefaultRemoteAddress()
          Returns the defaultRemoteAddress.
protected  boolean isDefaultSenderDomainPart()
          Returns the defaultSenderDomainPart.
protected  boolean isDefaultSenderLocalPart()
          Returns the defaultSenderLocalPart.
protected  boolean isLocalRecipient(MailAddress recipient)
          Method isLocalRecipient.
protected  boolean isLocalServer(MailAddress recipient)
          Method isLocalServer.
protected  boolean isLocalUser(MailAddress recipient)
          Method isLocalUser.
protected  java.lang.Boolean isMaxMessageSizeExceeded()
          Returns the maxMessageSizeExceeded, lazily initialised as required.
protected  boolean isMessageDeleted()
          Is the DELETED flag set?
protected  boolean isMessageSeen()
          Is the SEEN flag set?
protected  boolean isPreviouslyUnprocessed()
          Returns boolean indicating if the message to be delivered was unprocessed in a previous delivery attempt.
protected  boolean isRecipientNotFound()
          Returns the recipientNotFound.
protected  java.lang.Boolean isRemoteReceivedHeaderInvalid()
          Returns the remoteReceivedHeaderInvalid, lazily initialised.
protected  boolean isRemoteRecipient()
          Returns the localRecipient.
protected  boolean isUserUndefined()
          Returns the userUndefined.
protected  void logStatusError(java.lang.String detailMsg)
          Log the status the current message as ERROR.
protected  void logStatusInfo(java.lang.String detailMsg)
          Log the status of the current message as INFO.
protected  void logStatusWarn(java.lang.String detailMsg)
          Log the status the current message as WARN.
 void process()
          Method process attempts to deliver a fetched message.
protected  void rejectBlacklistedRecipient(MailAddress recipient)
          Method rejectBlacklistedRecipient.
protected  void rejectMaxMessageSizeExceeded(int messageSize)
          Method rejectMaxMessageSizeExceeded.
protected  void rejectRecipientNotFound()
          Method rejectRecipientNotFound.
protected  void rejectRemoteReceivedHeaderInvalid()
          Method rejectRemoteReceivedHeaderInvalid.
protected  void rejectRemoteRecipient(MailAddress recipient)
          Method rejectRemoteRecipient.
protected  void rejectUserUndefined(MailAddress recipient)
          Method rejectUserUndefined.
protected  void sendMail(Mail mail)
          Method sendMail.
protected  void setBlacklistedRecipient(boolean blacklisted)
          Sets the Blacklisted.
protected  void setDefaultRemoteAddress(boolean defaultRemoteAddress)
          Sets the defaultRemoteAddress.
protected  void setDefaultSenderDomainPart(boolean defaultSenderDomainPart)
          Sets the defaultSenderDomainPart.
protected  void setDefaultSenderLocalPart(boolean defaultSenderLocalPart)
          Sets the defaultSenderLocalPart.
protected  void setMaxMessageSizeExceeded(java.lang.Boolean maxMessageSizeExceeded)
          Sets the maxMessageSizeExceeded.
protected  void setMessageDeleted()
          Set the DELETED flag.
protected  void setMessageIn(javax.mail.internet.MimeMessage messageIn)
          Sets the messageIn.
protected  void setMessageSeen()
           
protected  void setRecipientNotFound(boolean recipientNotFound)
          Sets the recipientNotFound.
protected  void setRemoteAddress(java.lang.String remoteAddress)
          Sets the remoteAddress.
protected  void setRemoteDomain(java.lang.String remoteDomain)
          Sets the remoteDomain.
protected  void setRemoteHostName(java.lang.String remoteHostName)
          Sets the remoteHostName.
protected  void setRemoteReceivedHeaderInvalid(java.lang.Boolean remoteReceivedHeaderInvalid)
          Sets the remoteReceivedHeaderInvalid.
protected  void setRemoteRecipient(boolean localRecipient)
          Sets the localRecipient.
protected  void setUserUndefined(boolean userUndefined)
          Sets the userUndefined.
protected  void updateMaxMessageSizeExceeded()
          Refreshes the maxMessageSizeExceeded.
protected  void updateRemoteAddress()
          Updates the remoteAddress.
protected  void updateRemoteDomain()
          Updates the remoteDomain.
protected  void updateRemoteHostName()
          Updates the remoteHostName.
protected  void updateRemoteReceivedHeaderInvalid()
          Updates the remoteReceivedHeaderInvalid.
 
Methods inherited from class org.apache.james.fetchmail.ProcessorAbstract
computeAttributePrefix, getAccount, getAttributePrefix, getBlacklist, getConfiguration, getCustomRecipientHeader, getDefaultDomainName, getDefaultLocalPart, getDeferredRecipientNotFoundMessageIDs, getFetchTaskName, getHost, getJavaMailFolderName, getJavaMailProviderName, getLocalUsers, getLogger, getMaxMessageSizeLimit, getPassword, getRecipient, getRemoteReceivedHeaderIndex, getServer, getSession, getUser, isDeferRecipientNotFound, isFetchAll, isIgnoreRecipientHeader, isLeave, isLeaveBlacklisted, isLeaveMaxMessageSizeExceeded, isLeaveRecipientNotFound, isLeaveRemoteReceivedHeaderInvalid, isLeaveRemoteRecipient, isLeaveUndeliverable, isLeaveUserUndefined, isMarkBlacklistedSeen, isMarkMaxMessageSizeExceededSeen, isMarkRecipientNotFoundSeen, isMarkRemoteReceivedHeaderInvalidSeen, isMarkRemoteRecipientSeen, isMarkSeen, isMarkUndeliverableSeen, isMarkUserUndefinedSeen, isOpenReadOnly, isRecurse, isRejectBlacklisted, isRejectMaxMessageSizeExceeded, isRejectRecipientNotFound, isRejectRemoteReceivedHeaderInvalid, isRejectRemoteRecipient, isRejectUserUndefined, setAccount, setAttributePrefix, updateAttributePrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

process

public void process()
             throws javax.mail.MessagingException
Method process attempts to deliver a fetched message.

Specified by:
process in class ProcessorAbstract
Throws:
javax.mail.MessagingException
See Also:
ProcessorAbstract.process()

rejectRemoteRecipient

protected void rejectRemoteRecipient(MailAddress recipient)
                              throws javax.mail.MessagingException
Method rejectRemoteRecipient.

Parameters:
recipient -
Throws:
javax.mail.MessagingException

rejectBlacklistedRecipient

protected void rejectBlacklistedRecipient(MailAddress recipient)
                                   throws javax.mail.MessagingException
Method rejectBlacklistedRecipient.

Parameters:
recipient -
Throws:
javax.mail.MessagingException

rejectRecipientNotFound

protected void rejectRecipientNotFound()
                                throws javax.mail.MessagingException
Method rejectRecipientNotFound.

Throws:
javax.mail.MessagingException

rejectUserUndefined

protected void rejectUserUndefined(MailAddress recipient)
                            throws javax.mail.MessagingException
Method rejectUserUndefined.

Parameters:
recipient -
Throws:
javax.mail.MessagingException

rejectMaxMessageSizeExceeded

protected void rejectMaxMessageSizeExceeded(int messageSize)
                                     throws javax.mail.MessagingException
Method rejectMaxMessageSizeExceeded.

Parameters:
message - size
Throws:
javax.mail.MessagingException

rejectRemoteReceivedHeaderInvalid

protected void rejectRemoteReceivedHeaderInvalid()
                                          throws javax.mail.MessagingException
Method rejectRemoteReceivedHeaderInvalid.

Throws:
javax.mail.MessagingException

createMessage

protected javax.mail.internet.MimeMessage createMessage()
                                                 throws javax.mail.MessagingException

Method createMessage answers a new MimeMessage from the fetched message.

If the maximum message size is exceeded, an empty message is created, else the new message is a copy of the received message.

Returns:
MimeMessage
Throws:
javax.mail.MessagingException

createEmptyMessage

protected javax.mail.internet.MimeMessage createEmptyMessage()
                                                      throws javax.mail.MessagingException
Method createEmptyMessage answers a new MimeMessage from the fetched message with the message contents removed.

Returns:
MimeMessage
Throws:
javax.mail.MessagingException

createMail

protected Mail createMail(javax.mail.internet.MimeMessage message,
                          MailAddress recipient)
                   throws javax.mail.MessagingException,
                          java.net.UnknownHostException
Method createMail creates a new Mail.

Parameters:
message -
recipient -
Returns:
Mail
Throws:
javax.mail.MessagingException
java.net.UnknownHostException

getSender

protected MailAddress getSender()
                         throws javax.mail.MessagingException

Method getSender answers a MailAddress for the sender. When the sender local part and/or domain part can not be obtained from the mail, default values are used. The flags 'defaultSenderLocalPart' and 'defaultSenderDomainPart' are set accordingly.

Returns:
MailAddress
Throws:
javax.mail.MessagingException

computeRemoteDomain

protected java.lang.String computeRemoteDomain()
                                        throws javax.mail.MessagingException

Method computeRemoteDomain answers a String that is the RFC2822 compliant "Received : from" domain extracted from the message being processed for the remote domain that sent the message.

Often the remote domain is the domain that sent the message to the host of the message store, the second "received" header, which has an index of 1. Other times, messages may be received by a edge mail server and relayed internally through one or more internal mail servers prior to arriving at the message store host. In these cases the index is 1 + the number of internal servers through which a mail passes.

The index of the header to use is specified by the configuration parameter RemoteReceivedHeaderIndex. This is set to point to the received header prior to the remote mail server, the one prior to the edge mail server.

"received" headers are searched starting at the specified index. If a domain in the "received" header is not found, successively closer "received" headers are tried. If a domain is not found in this way, the local machine is used as the domain. Finally, if the local domain cannot be determined, the local address 127.0.0.1 is used.

Returns:
String An RFC2822 compliant "Received : from" domain name
Throws:
javax.mail.MessagingException

handleBouncing

protected void handleBouncing(Mail mail)
                       throws javax.mail.MessagingException
Method handleBouncing sets the Mail state to ERROR and delete from the message store.

Parameters:
mail -
Throws:
javax.mail.MessagingException

handleParseException

protected void handleParseException(javax.mail.internet.ParseException ex)
                             throws javax.mail.MessagingException
Method handleParseException.

Parameters:
ex -
Throws:
javax.mail.MessagingException

handleUnknownHostException

protected void handleUnknownHostException(java.net.UnknownHostException ex)
                                   throws javax.mail.MessagingException
Method handleUnknownHostException.

Parameters:
ex -
Throws:
javax.mail.MessagingException

isLocalRecipient

protected boolean isLocalRecipient(MailAddress recipient)
Method isLocalRecipient.

Parameters:
recipient -
Returns:
boolean

isLocalServer

protected boolean isLocalServer(MailAddress recipient)
Method isLocalServer.

Parameters:
recipient -
Returns:
boolean

isLocalUser

protected boolean isLocalUser(MailAddress recipient)
Method isLocalUser.

Parameters:
recipient -
Returns:
boolean

isBlacklistedRecipient

protected boolean isBlacklistedRecipient(MailAddress recipient)
Method isBlacklistedRecipient.

Parameters:
recipient -
Returns:
boolean

isBouncing

protected boolean isBouncing()
                      throws javax.mail.MessagingException
Check if this mail has been bouncing by counting the X-fetched-from headers for this task

Returns:
boolean
Throws:
javax.mail.MessagingException

sendMail

protected void sendMail(Mail mail)
                 throws javax.mail.MessagingException
Method sendMail.

Parameters:
mail -
Throws:
javax.mail.MessagingException

getEnvelopeRecipient

protected java.lang.String getEnvelopeRecipient(javax.mail.internet.MimeMessage msg)
                                         throws javax.mail.MessagingException
Method getEnvelopeRecipient answers the recipient if found else null. Try and parse the "for" parameter from a Received header Maybe not the most accurate parsing in the world but it should do I opted not to use ORO (maybe I should have)

Parameters:
msg -
Returns:
String
Throws:
javax.mail.MessagingException

getIntendedRecipient

protected MailAddress getIntendedRecipient()
                                    throws javax.mail.MessagingException
Method getIntendedRecipient answers the sole intended recipient else null.

Returns:
MailAddress
Throws:
javax.mail.MessagingException

getMessageIn

protected javax.mail.internet.MimeMessage getMessageIn()
Returns the messageIn.

Returns:
MimeMessage

setMessageIn

protected void setMessageIn(javax.mail.internet.MimeMessage messageIn)
Sets the messageIn.

Parameters:
messageIn - The messageIn to set

isRemoteRecipient

protected boolean isRemoteRecipient()
Returns the localRecipient.

Returns:
boolean

isPreviouslyUnprocessed

protected boolean isPreviouslyUnprocessed()
Returns boolean indicating if the message to be delivered was unprocessed in a previous delivery attempt.

Returns:
boolean

logStatusInfo

protected void logStatusInfo(java.lang.String detailMsg)
                      throws javax.mail.MessagingException
Log the status of the current message as INFO.

Parameters:
detailMsg -
Throws:
javax.mail.MessagingException

logStatusWarn

protected void logStatusWarn(java.lang.String detailMsg)
                      throws javax.mail.MessagingException
Log the status the current message as WARN.

Parameters:
detailMsg -
Throws:
javax.mail.MessagingException

logStatusError

protected void logStatusError(java.lang.String detailMsg)
                       throws javax.mail.MessagingException
Log the status the current message as ERROR.

Parameters:
detailMsg -
Throws:
javax.mail.MessagingException

getStatusReport

protected java.lang.StringBuffer getStatusReport(java.lang.String detailMsg)
                                          throws javax.mail.MessagingException
Answer a StringBuffer containing a message reflecting the current status of the message being processed.

Parameters:
detailMsg -
Returns:
StringBuffer
Throws:
javax.mail.MessagingException

isUserUndefined

protected boolean isUserUndefined()
Returns the userUndefined.

Returns:
boolean

isMessageDeleted

protected boolean isMessageDeleted()
                            throws javax.mail.MessagingException
Is the DELETED flag set?

Throws:
javax.mail.MessagingException

isMessageSeen

protected boolean isMessageSeen()
                         throws javax.mail.MessagingException
Is the SEEN flag set?

Throws:
javax.mail.MessagingException

setMessageDeleted

protected void setMessageDeleted()
                          throws javax.mail.MessagingException
Set the DELETED flag.

Throws:
javax.mail.MessagingException

setMessageSeen

protected void setMessageSeen()
                       throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

handleMarkSeenNotPermanent

protected void handleMarkSeenNotPermanent()
                                   throws javax.mail.MessagingException

Handler for when the folder does not support the SEEN flag. The default behaviour implemented here is to log a warning and set the flag anyway.

Subclasses may choose to override this and implement their own solutions.

Throws:
javax.mail.MessagingException

isBlacklistedRecipient

protected boolean isBlacklistedRecipient()
Returns the Blacklisted.

Returns:
boolean

setRemoteRecipient

protected void setRemoteRecipient(boolean localRecipient)
Sets the localRecipient.

Parameters:
localRecipient - The localRecipient to set

setUserUndefined

protected void setUserUndefined(boolean userUndefined)
Sets the userUndefined.

Parameters:
userUndefined - The userUndefined to set

addMailAttributes

protected void addMailAttributes(Mail aMail)
                          throws javax.mail.MessagingException
Adds the mail attributes to a Mail.

Parameters:
aMail - a Mail instance
Throws:
javax.mail.MessagingException

addErrorMessages

protected void addErrorMessages(Mail mail)
                         throws javax.mail.MessagingException
Adds any required error messages to a Mail.

Parameters:
aMail - a Mail instance
Throws:
javax.mail.MessagingException

setBlacklistedRecipient

protected void setBlacklistedRecipient(boolean blacklisted)
Sets the Blacklisted.

Parameters:
blacklisted - The blacklisted to set

isRecipientNotFound

protected boolean isRecipientNotFound()
Returns the recipientNotFound.

Returns:
boolean

setRecipientNotFound

protected void setRecipientNotFound(boolean recipientNotFound)
Sets the recipientNotFound.

Parameters:
recipientNotFound - The recipientNotFound to set

getRemoteDomain

protected java.lang.String getRemoteDomain()
                                    throws javax.mail.MessagingException
Returns the remoteDomain, lazily initialised as required.

Returns:
String
Throws:
javax.mail.MessagingException

setRemoteDomain

protected void setRemoteDomain(java.lang.String remoteDomain)
Sets the remoteDomain.

Parameters:
remoteDomain - The remoteDomain to set

updateRemoteDomain

protected void updateRemoteDomain()
                           throws javax.mail.MessagingException
Updates the remoteDomain.

Throws:
javax.mail.MessagingException

computeRemoteAddress

protected java.lang.String computeRemoteAddress()
                                         throws javax.mail.MessagingException,
                                                java.net.UnknownHostException
Answer the IP Address of the remote server for the message being processed.

Returns:
String
Throws:
javax.mail.MessagingException
java.net.UnknownHostException

computeRemoteHostName

protected java.lang.String computeRemoteHostName()
                                          throws javax.mail.MessagingException,
                                                 java.net.UnknownHostException
Answer the Canonical host name of the remote server for the message being processed.

Returns:
String
Throws:
javax.mail.MessagingException
java.net.UnknownHostException

getRemoteAddress

protected java.lang.String getRemoteAddress()
                                     throws javax.mail.MessagingException,
                                            java.net.UnknownHostException
Returns the remoteAddress, lazily initialised as required.

Returns:
String
Throws:
javax.mail.MessagingException
java.net.UnknownHostException

getRemoteHostName

protected java.lang.String getRemoteHostName()
                                      throws javax.mail.MessagingException,
                                             java.net.UnknownHostException
Returns the remoteHostName, lazily initialised as required.

Returns:
String
Throws:
javax.mail.MessagingException
java.net.UnknownHostException

setRemoteAddress

protected void setRemoteAddress(java.lang.String remoteAddress)
Sets the remoteAddress.

Parameters:
remoteAddress - The remoteAddress to set

updateRemoteAddress

protected void updateRemoteAddress()
                            throws javax.mail.MessagingException,
                                   java.net.UnknownHostException
Updates the remoteAddress.

Throws:
javax.mail.MessagingException
java.net.UnknownHostException

setRemoteHostName

protected void setRemoteHostName(java.lang.String remoteHostName)
Sets the remoteHostName.

Parameters:
remoteHostName - The remoteHostName to set

updateRemoteHostName

protected void updateRemoteHostName()
                             throws javax.mail.MessagingException,
                                    java.net.UnknownHostException
Updates the remoteHostName.

Throws:
javax.mail.MessagingException
java.net.UnknownHostException

getRFC2822RECEIVEDHeaderFields

public static java.lang.String getRFC2822RECEIVEDHeaderFields()
Returns the rFC2822RECEIVEDHeaderFields.

Returns:
String

isMaxMessageSizeExceeded

protected java.lang.Boolean isMaxMessageSizeExceeded()
                                              throws javax.mail.MessagingException
Returns the maxMessageSizeExceeded, lazily initialised as required.

Returns:
Boolean
Throws:
javax.mail.MessagingException

updateMaxMessageSizeExceeded

protected void updateMaxMessageSizeExceeded()
                                     throws javax.mail.MessagingException
Refreshes the maxMessageSizeExceeded.

Throws:
javax.mail.MessagingException

computeMaxMessageSizeExceeded

protected java.lang.Boolean computeMaxMessageSizeExceeded()
                                                   throws javax.mail.MessagingException
Compute the maxMessageSizeExceeded.

Returns:
Boolean
Throws:
javax.mail.MessagingException

setMaxMessageSizeExceeded

protected void setMaxMessageSizeExceeded(java.lang.Boolean maxMessageSizeExceeded)
Sets the maxMessageSizeExceeded.

Parameters:
maxMessageSizeExceeded - The maxMessageSizeExceeded to set

isRemoteReceivedHeaderInvalid

protected java.lang.Boolean isRemoteReceivedHeaderInvalid()
                                                   throws javax.mail.MessagingException
Returns the remoteReceivedHeaderInvalid, lazily initialised.

Returns:
Boolean
Throws:
javax.mail.MessagingException

computeRemoteReceivedHeaderInvalid

protected java.lang.Boolean computeRemoteReceivedHeaderInvalid()
                                                        throws javax.mail.MessagingException
Computes the remoteReceivedHeaderInvalid.

Returns:
Boolean
Throws:
javax.mail.MessagingException

setRemoteReceivedHeaderInvalid

protected void setRemoteReceivedHeaderInvalid(java.lang.Boolean remoteReceivedHeaderInvalid)
Sets the remoteReceivedHeaderInvalid.

Parameters:
remoteReceivedHeaderInvalid - The remoteReceivedHeaderInvalid to set

updateRemoteReceivedHeaderInvalid

protected void updateRemoteReceivedHeaderInvalid()
                                          throws javax.mail.MessagingException
Updates the remoteReceivedHeaderInvalid.

Throws:
javax.mail.MessagingException

isDefaultSenderDomainPart

protected boolean isDefaultSenderDomainPart()
Returns the defaultSenderDomainPart.

Returns:
boolean

isDefaultSenderLocalPart

protected boolean isDefaultSenderLocalPart()
Returns the defaultSenderLocalPart.

Returns:
boolean

setDefaultSenderDomainPart

protected void setDefaultSenderDomainPart(boolean defaultSenderDomainPart)
Sets the defaultSenderDomainPart.

Parameters:
defaultSenderDomainPart - The defaultSenderDomainPart to set

setDefaultSenderLocalPart

protected void setDefaultSenderLocalPart(boolean defaultSenderLocalPart)
Sets the defaultSenderLocalPart.

Parameters:
defaultSenderLocalPart - The defaultSenderLocalPart to set

isDefaultRemoteAddress

protected boolean isDefaultRemoteAddress()
Returns the defaultRemoteAddress.

Returns:
boolean

setDefaultRemoteAddress

protected void setDefaultRemoteAddress(boolean defaultRemoteAddress)
Sets the defaultRemoteAddress.

Parameters:
defaultRemoteAddress - The defaultRemoteAddress to set


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.