Tuesday, September 11, 2012

Workflow Notification Mailer Setup

NOTIFICATION MAILER ARCHITECTURE

The main component of the Oracle Workflow Notification Mailer is the executable
WFMAIL. This is a server side program that queries the database for any pending
notifications. It then dispatches these notifications by calling sendmail for UNIX and the MAPI APIs for Microsoft Windows NT. The notification mailer also queries the local inbox for incoming messages. These messages are validated and then passed to the database for response processing. To configure Workflow Notification Mailer we have to do OS level setup (Sendmail) and Application level setup.

1. OS Level Setup
2. Application level Configuration

1. OS (Oracle Enterprise Linux 4 update 7) level Setup
At Os level we need to do bellow setups before configuring Application level
Sendmail should be installed by default when you install RedHat Linux. If it is not then you need to install the Sendmail RPM’s with the Red Hat distribution
Sendmail RPM’s (In Oracle Enterprise Linux 4 update 7)




Note: By default Oracle Enterprise Linux 4 update 7 have above all RPM’s

A. Configuring Sendmail

Edit the /etc/mail/sendmal.mc file
Look for this bellow line in this file
DAEMON_OPTIONS (`Port=smtp,Addr=127.0.0.1, Name=MTA')dn


Add 1 line with SMTP port Number and Server IP to this above line

DAEMON_OPTIONS (`Port=25,Addr=192.168.1.61, Name=MTA')dnl

Here 25 is SMTP Port Number, 192.168.1.61 is Server IP

After adding his like file look like this

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=25,Addr=192.168.1.61, Name=MTA')dnl

Save the file


Rebuild /etc/sendmail.cf from the revised /etc/mail/sendmail.mc
$m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf


Restart the sendmail services
$ /etc/init.d/sendmail restart
B.Starting Sendmail
You can use the chkconfig command to get sendmail configured to start at boot time
$chkconfig sendmail on
The services should now be set at the appropriate run levels and then checked to ensure they are correct.

#chkconfig --level 2345 sendmail on

To check run level
#chkconfig --list sendmail
C. Check the sendmail services
$telnet
$telnet 192.168.1.61 25



Now sendmail is working



D. Dovecot IMAP Server
Now that the sendmail server has been setup to allow the sending of emails, we need to configure a means for the user to retrieve any emails that are waiting for them on the server. One of the packages that do this is dovecot, which handles POP and IMAP mailboxes in clear text or with link encryption (POPS and IMAPS); IMAPS is the preferred mail protocol for MUAs.
Install Dovecot RPM if not installed



E: Start the Dovecot services
Start the services from Command

$ /etc/init.d/dovecot restart
Or
Start Dovecot services from Server





Start the dovecot services then save

F.Check the Dovecot services
$telnet 192.168.1.61 143


G. Check the mails are going to your mail ID from Linux command line
$ mail –s “Hi this is from WF Server “ yourID@gmail.com
If u gets this mail to your mail Id It then send mail is working fine
H. Create DISCARD & PROCESS folders
Login to the Application User (testappl)
Under testappl user home it will be one mail folder. Under mail folder you create DISCARD & PROCESS folders




2. Application level Configuration

1. We can configure workflow notification mailer from Oracle Application Manager (OAM)


2. There are two kinds of Notification Outbound & Inbound in Workflow Mailer

3. For Outbound Notification, CM (Concurrent Manager) node should be able to connect to SMTP (Simple Mail Transfer Protocol) server/relay.

4. For Inbound Notification (Optional), CM node should be able to connect to IMAP (Internet Message Access Protocol) Server.


5. Workflow Notification Mailer in background run as Concurrent Manager (Workflow Mailer Service, Workflow Agent Listener Service)






Enable Workflow Agent Listener and Notification Mailer concurrent



programs




Schedule the Workflow Background process, Notification Mailer concurrent requests

Workflow Mailer Service, Workflow Agent Listener Service should be started

Configure Workflow Notification Mailer
Login to Oracle Application Manager
Go to Site Map








1. Click on Next



2. Click on Next


3. Here give Application User name, password and Test Mail Id
Give PROCESS and DISCARD folders (which we have created in application server) name in EMail Processing




4. Click on Next



5. Give Submit Date and time then click on Next



6. Click on Next


7. Here give user name and click on Send Test Message

Click on Next







8. Click on finish



B. STARTUP NOTIFICATION MAILER

The mailer program can be started from command line or through a concurrent
Program called "Notification Mailer". When the notification mailer is started as a concurrent request in Oracle Applications, the OS process is run by the Applications Manager (APPLMGR) user.

To start it from the application, submit the "Notification Mailer" Concurrent request.

To start it from command line on UNIX, execute the following command:

Go to FND_TOP/bin/

$WFMAIL apps/Pass 0 Y $FND_TOP/resource/wfmail.cfg



Log file for Workflow Mailer Notification are at $APPLCSF/$APPLLOG/





$ telnet XXXXXXX.oracleoutsourcing.com 25
Trying 140.85.252.105...
Connected to vmohsgrnc005.oracleoutsourcing.com (140.85.252.105).
Escape character is '^]'.
220 XXXXXXXX.oracleoutsourcing.com ESMTP ready at Tue, 11 Sep 2012 23:57:13 -0500 Oracle Corporation - Unauthorized usage or access is prohibited
EHLO test.com
250-XXXXXXX.oracleoutsourcing.com Hello XXXXXX.oracleoutsourcing.com [140.85.252.105], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
MAIL FROM:shail@oracle.com
250 2.1.0 shail@oracle.com... Sender ok
RCPT TO:shailapps@gmail.com
250 2.1.5 shailapps@gmail.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
TESTING THE MAIL SERVICE
.


$ telnet XXXXXXXXXX.oracleoutsourcing.com 143
Trying 140.85.252.105...
Connected to XXXXXXX.oracleoutsourcing.com (XX.XXX.252.105).
Escape character is '^]'.


$ id
uid=30010(wfpgrn1i) gid=20010(aapgrn1i) groups=20010(aapgrn1i)
$ pwd
/pgrn1i/applcsf/wfpgrn1i
$ ls -lrt
total 2
drwxr-xr-x 3 wfpgrn1i aapgrn1i 7 Sep  5 23:09 mail
$ cd mail
$ ls
DISCARD  PROCESS  Trash
$ ls -lrt
total 535
-rw------- 1 wfpgrn1i aapgrn1i      0 Feb 29  2012 Trash
-rw-r--r-- 1 wfpgrn1i aapgrn1i  18971 Sep  7 12:31 PROCESS
-rw-r--r-- 1 wfpgrn1i aapgrn1i 431484 Sep 10 02:50 DISCARD
$




2 comments:

Aruna said...

It's very Awesome to see the Quality of works...Keep doing this Good Work
Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

Achalkumar Technical Architect/Oracle Apps DBA said...

Hi Shail,

SMTP is working absolutely fine. Now I am configuring IMAP with dovecot.
but not able to get mail with reply to address. Do i need to set up DNS entry or any other configuration required on domain level?

any help will be appreciated.