Troubleshooting the Email Listener

You can troubleshoot email listener related problems by enabling the SMTP debug. To enable SMPT debug, add the ematrix.smtp.debug as java startup parameter.

The following sample shows a mailListener.sh file with instructions on how to enable SMPT debug.

Dematrix.smtp.debug = true;
###############################################################
#################
#
# Set up Java parameters
# For smtp debugging add -Dematrix.smtp.debug=true to 
JAVA_OPTIONS
#
###############################################################
#################
JAVA_OPTIONS="-Xss512k -Xms256m -Xmx256m"

The email listener uses java.util.logging package for logging. The java.util.logging package is part of JDK starting from version 1.4.

The mailListener.xml also defines the file name pattern for runtime logging using the XML tag matrixMailListener log file. The file name pattern accepts flags defined in FileHandler documentation found in http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/FileHandler.html.

If you do not define the file name, logging does not take place.

Sample SMTP debug

DEBUG: setDebug: JavaMail version 1.3.3
polling ...
DEBUG: getProvider() returning 
javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.
POP3Store,Sun Microsystems, Inc]
DEBUG POP3: connecting to host "engmail1.matrixone.net", port 
110, isSSL false
S: +OK Qpopper (version 4.0.5) at engmail1 starting.
C: USER matrixeng
S: +OK Password required for matrixeng.
C: PASS engmatrix
S: +OK matrixeng has 1 visible message (0 hidden) in 7974 
octets.
C: STAT
S: +OK 1 7974
C: NOOP
S: +OK no big woop
C: TOP 1 0
S: +OK Message follows
Received: from mail.matrixone.com (matrixmail.matrixone.net 
[10.1.16.122])
        by engmail1.matrixone.net (8.12.10+Sun/8.12.9) with 
ESMTP id k63FpJch021
372
        for <matrixeng@engmail1.matrixone.net>; Mon, 3 Jul 2006 
11:51:19 -0400 (
EDT)