Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Tuesday, September 18, 2007

Steps to verify IMAP and SMTP setup on Apps

Metalink note 242941.1 gives the steps as follows in point 8 :

8. Verify the SMTP and IMAP Server details are correct and these components are working.

Make sure customer has set up a Mail Client that connects to the same IMAP account that the Java Mailer is using, and it is configured to send outbound emails using the same SMTP Server. Verify that you can send an email from this account and have it be received by the receiver. Verify that you can send an email to this IMAP account and that the email is received by this IMAP account.

· Following are the manual steps to verify SMTP and IMAP server configuration. The lines marked with ‘%%’ are the commands to enter. Please exclude ‘%%’ when entering the commands, ‘%%’ is there for clarification purposes. The following examples were run on a Sun Solaris platform, on other UNIX platforms, the return result may look slightly different, in any case, you will get the general idea.

Important: These tests must be run from the concurrent processing tier where the Java Mailer is running.

a) Verify SMTP Server: In this example, crmops02.us.oracle.com is the SMTP server running on the default port 25, and ap102ses.us.oracle.com is the server where the Java Mailer(concurrent processing tier) runs. Wfuser is the mail account used by the Java Mailer. myemail@oracle.com is a valid email address to receive email from the Java Mailer.

%% telnet crmops02.us.oracle.com 25

Trying 144.25.76.117...

Connected to crmops02.us.oracle.com.

Escape character is '^]'.

220 crmops02.us.oracle.com ESMTP Sendmail 8.9.3 (PHNE_18546)/8.7.1; Fri, 31 Jan 2003 05:56:18 -0800 (PST)

%% EHLO ap102ses.us.oracle.com

250-crmops02.us.oracle.com Hello ap102ses.us.oracle.com [144.25.76.44] (may be forged), pleased to meet you

250-EXPN

250-VERB

250-8BITMIME

250-SIZE

250-DSN

250-ONEX

250-ETRN

250-XUSR

250 HELP

%% MAIL FROM: wfuser@crmops02.us.oracle.com

250 wfuser@crmops02.us.oracle.com... Sender ok

%% RCPT TO: myemail@oracle.com

250 myemail@oracle.com... Recipient ok

%% DATA

354 Enter mail, end with "." on a line by itself

%% Subject: Test message via CRMOPS2

%%

%% Test message body

%% .

250 FAA17833 Message accepted for delivery

%% quit

221 crmops02.us.oracle.com closing connection

Connection closed by foreign host.

Verify that myemail@oracle.com receives an email from wfuser01@crmops02.us.oracle.com. If not, then the SMTP server is not configured properly. Please contact the SMTP System Administrator to correct the problem.

b) Verify IMAP server: In this example, ap700lts.us.oracle.com is the IMAP server running on the default port 143. Each IMAP4 command must start with a number/character, and it does not matter if you use the same number/character for all the commands. Spaces are important and multiple spaces/tabs are not allowed. For each successful command completion the server ends the response by "n OK ....". If a command fails then the failure reason is printed.

%% telnet ap700lts.us.oracle.com 143

Trying 130.35.81.214...

Connected to ap700lts.us.oracle.com.

Escape character is '^]'.

* OK Domino IMAP4 Server Release 5.0.11 ready Sun, 23 Nov 2003 10:26:49 -0800

%% 1 login wfuser welcome

1 OK LOGIN completed

%% 1 select "INBOX"

* 23 EXISTS

* 0 RECENT

* OK [UIDVALIDITY 0] UIDs valid

* FLAGS (\Flagged \Seen \Answered \Deleted \Draft)

* OK [PERMANENTFLAGS (\Flagged \Seen \Answered \Deleted \Draft)] Permanent flags

1 OK [READ-WRITE] SELECT completed

%% 1 select "DISCARD"

* 54 EXISTS

* 0 RECENT

* OK [UIDVALIDITY 6] UIDs valid

* FLAGS (\Flagged \Seen \Answered \Deleted \Draft)

* OK [PERMANENTFLAGS (\Flagged \Seen \Answered \Deleted \Draft)] Permanent flags

1 OK [READ-WRITE] SELECT completed

%% 1 select "PROCESSED"

* 58 EXISTS

* 0 RECENT

* OK [UIDVALIDITY 4] UIDs valid

* FLAGS (\Flagged \Seen \Answered \Deleted \Draft)

* OK [PERMANENTFLAGS (\Flagged \Seen \Answered \Deleted \Draft)] Permanent flags

1 OK [READ-WRITE] SELECT completed

%% 1 logout

* BYE ap700lts.us.oracle.com IMAP4rev1 server terminating connection

1 OK LOGOUT completed

Connection closed by foreign host.

c) Patch 3265133 (included in Rollup 5.1 - patch 3409889) provides a simple commandline interface that uses native JavaMail APIs. This interface can be used to validate IMAP / SMTP connectivity from the concurrent-tier where mailer runs. Syntax can be found by running the following on the concurrent-tier after initializing the APPS environment:

Values in <...> are the values defined (or to be defined) for mailer configuration using OAM.

IMAP Server:

$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Dserver= -Dport=143

-Daccount= -Dpassword= -Dconnect_timeout=120

-Dfolder=INBOX oracle.apps.fnd.wf.mailer.Mailer

Example output:

----------------

bash-2.05$ $AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Dserver=ap700lts.us.oracle.com -Dport=143

-Daccount=notesuser2@ap700lts.us.oracle.com -Dpassword=XXXXX -Dconnect_timeout=120 -Dfolder=INBOX oracle.apps.fnd.wf.mailer.Mailer

Server ap700lts.us.oracle.com at port 143 is reachable

Successfully connected to the IMAP account

Testing existense of folder:INBOX

Folder [INBOX] exists

Note: Special folders like Inbox/Trash may not get listed on some IMAP servers

Folders defined are:

INBOX

Drafts

Sent

PROCESS

DISCARD

------------------------------------------

Note: Email Processing (PROCESS and DISCARD Folder) should get listed like "PROCESS" and "DISCARD" in output above. If not, these folders are required to be created by connecting to the IMAP / Inbound Email account with any email client (e.g. Netscape Messenger or Microsoft Outlook). These folders should be created before they are specified in the mailer configuration within OAM. The notification mailer may not be able to access folders that were created using command line tools outside the e-mail client.

SMTP Server:

$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=smtp -Dserver=

-Dport=25 -Daccount= -Dconnect_timeout=120

oracle.apps.fnd.wf.mailer.Mailer

Example Output:

-----------------

bash-2.05$ $AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=smtp -Dserver=ap6120rt.us.oracle.com -Dport=25

-Daccount=notesuser6@ap700lts.us.oracle.com -Dconnect_timeout=120 oracle.apps.fnd.wf.mailer.Mailer

Server ap6120rt.us.oracle.com at port 25 is reachable

Successfully connected to the SMTP account

------------------------------------------

If above tests are successful from commandline, mailer should also be able to connect to IMAP / SMTP server. If these tests are not successful then mailer will also not be able to connect. Then it is IMAP / SMTP server issue that administrators need to take a look at.

No comments: