public class EximEmailExaminer
extends atg.service.email.examiner.EmailExaminerImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
mEmailTrackingTools, mExtractOriginalMessageIDFromMessageText, mScanningContentForAdditionalHeaders, X_ATG_HEADER_PREFIX
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
EximEmailExaminer() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
examineEmail(javax.mail.Message pMessage)
This method examines the given message in some implementation
specific manner.
|
java.lang.String |
getBouncedEmailAddress(javax.mail.Message pMessage)
This method gets the email address from a presumed bounced
email in sendmail format.
|
java.lang.String |
getBouncedEnhancedStatusCode(javax.mail.Message pMessage)
Gets the enhanced status code according to RFC 1893 that gives
more detail on the nature of the error.
|
java.lang.String |
getBouncedEnhancedStatusCode(java.lang.String pContent)
Gets the enhanced status code from the given content, if any
exists.
|
java.lang.String |
getBouncedErrorMessage(javax.mail.Message pMessage)
This method gets any associated error message that is given
from a bounced email.
|
java.lang.String |
getBouncedErrorMessage(java.lang.String pContent)
Gets the error message for the given bounced email content
It is assumed that the error message is after a triple dot
in the same line that the reply code is present on.
|
java.lang.String |
getBouncedReplyCode(javax.mail.Message pMessage)
Gets the reply code (RFC 821) of the given bounced message.
|
java.lang.String |
getBouncedReplyCode(java.lang.String pContent)
Gets the reply code present in the given email content
It's assumed that the reply code is present after the
"]: " string in the given content
|
boolean |
getConfiguredSoftBounceCodes(java.lang.String replyCode)
Get the soft bounce reply codes from the configuration file
|
java.lang.String[] |
getMonitoredBounceReplyCodes()
Gets the MonitoredReplyCodes property
|
boolean |
isBouncedEmail(javax.mail.Message pMessage)
Determines whether the passed in message was bounced by
an exim MTA.
|
void |
setMonitoredBounceReplyCodes(java.lang.String[] pMonitoredBounceReplyCodes)
Sets the MonitoredBounceReplyCodes property
|
getAdditionalHeaderPrefixes, getAdditionalHeaders, getEmailTrackingTools, getMTAName, getOriginalMessageID, getSoftBounceEnhancedStatusCodes, getSoftBounceReplyCodes, getTrackingData, isExtractOriginalMessageIDFromMessageText, isScanningContentForAdditionalHeaders, isSoftBouncedEmail, setAdditionalHeaderPrefixes, setEmailTrackingTools, setExtractOriginalMessageIDFromMessageText, setMTAName, setScanningContentForAdditionalHeaders, setSoftBounceEnhancedStatusCodes, setSoftBounceReplyCodes
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public void setMonitoredBounceReplyCodes(java.lang.String[] pMonitoredBounceReplyCodes)
pMonitoredBounceReplyCodes
- an array of RFC 821 reply codes
that will indicate an email is bounced. The isBouncedEmail
method will only return true if the reply code set in the bounced
email matches one of the values of this propertypublic java.lang.String[] getMonitoredBounceReplyCodes()
isBouncedEmail
method will only return true if the reply code set in the bounced
email matches one of the values of this propertypublic boolean isBouncedEmail(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
monitoredBounceReplyCodes
property, if set.pMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the header, or if invalid arguments are specifiedpublic boolean getConfiguredSoftBounceCodes(java.lang.String replyCode)
getConfiguredSoftBounceCodes
in class atg.service.email.examiner.EmailExaminerImpl
replyCode
- the replyCode to examinepublic java.lang.String getBouncedEmailAddress(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedReplyCode(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
getMonitoredBounceReplyCodes
array. This implementation looks for the reply code after the
sendmail session transcript line that starts with "<<< "pMessage
- the bounced message to examinepMessage
i.e. the formatting is not what was
expected, or the message has not been determined as bouncedjavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specified
NOTE: An exception should NOT be thrown if the given message
is not in a format recognized by this examiner. In most cases,
a list of examiners will be called upon to see if any consider
the message as bounced in a given operation. Developers are expected
to return null in this case.public java.lang.String getBouncedErrorMessage(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedEnhancedStatusCode(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.Object examineEmail(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedReplyCode(java.lang.String pContent)
pContent
- the content to examinepublic java.lang.String getBouncedErrorMessage(java.lang.String pContent)
pContent
- the email content to examinepublic java.lang.String getBouncedEnhancedStatusCode(java.lang.String pContent)
pContent
- the content to parse