Tuesday, March 19, 2013

How to setup an IMAP server on LINUX for E-Business Suite usage


How to setup an IMAP server on LINUX for E-Business Suite usage

Applies to:

Oracle Workflow Cartridge
Linux x86
Oracle Application Object Library - Version: 11.5.5 to 11.5.10
Goal

This note will guide you through the steps to allow you to set up an IMAP server so that you can respond to Notifications via e-mail and fully implement the "Forgot Password" functionality.
Solution

1. Install Dovecot IMAP/POP3 Mailer
- check if dovecot is installed
$ rpm -q dovecot

- Download dovecot-0.99.13-1.2.el4.test.i386.rpm if needed
( http://dag.wieers.com/packages/dovecot/ )


2. Install sendmail-mc if it is not installed


3. Create directory structure for dovecot if needed
- /var/run/dovecot/login
- /var/run/dovecot-login


4. Setup sendmail by editing mail configuration files

a. Look for and edit the following lines as needed in /etc/mail/sendmail.mc. Remove the "dnl" at the beginning of the line to make the line active.  Replace the IP address and host with your local values.

- LOCAL_DOMAIN(`AOL-linux.us.oracle.com')dnl
- MASQUERADE_DOMAIN(AOL-linux.us.oracle.com)dnl
- MASQUERADE_DOMAIN(AOL-linux)dnl

Change the following line to allow connection from the Internet. Be aware that this opens up your sendmail to public access.

From:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
To:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl


b. Add a line with your IP Address in /etc/mail/access
###.##.##.### RELAY

c. Add your hostname and full qualified hostname as needed in /etc/mail/local-host-names
AOL-linux.us.oracle.com
AOL-linux

d. Add mail accounts as needed in /etc/mail/virtusertable
applmgr@AOL-linux.us.oracle.com applmgr
wfmailer@AOL-linux.us.oracle.com wfmailer

e. Compile the mail configuration files
- $ make

f. Restart the sendmail service
- $ service sendmail restart


5. Setup dovecot by editing /etc/dovecot.conf. Edit and/or add the following lines as needed. These values are set for small usage and most defaults are being used for processes. Remove the comments (#) from any lines as needed.


Change the following and/or remove comment:

protocols = imap pop3
default_mail_env = mbox:~/mail:INBOX=/var/mail/%u
auth_userdb = passwd
mbox_locks = fcntl

base_dir = /var/run/dovecot
login_dir = /var/run/dovecot/login
imap_listen = *
pop3_listen = *
login_executable = /usr/libexec/dovecot/imap-login
login_user = dovecot
login_executable = /usr/libexec/dovecot/pop3-login
imap_executable = /usr/libexec/dovecot/imap
pop3_executable = /usr/libexec/dovecot/pop3
auth_executable = /usr/libexec/dovecot/dovecot-auth
auth_count = 1

These are already defaulted:

login = imap
login = pop3
auth = default
auth_mechanisms = plain
auth_user = root


6. Start the dovecot service (root user)

$ service dovecot start


7. Test connect to sendmail account testmail

$ telnet testsystem.domain 25
$ helo  
$ quit

Example:

$ telnet testsystem.domain 25
Trying ###.#.##.###...
Connected to testsystem.domain (###.#.##.###).
Escape character is '^]'.
220 testsystem.domain ESMTP Sendmail 8.13.1/8.13.1; Fri, 3 Mar 2006 15:24:02 -0500
helo AOLTest-sun
250 testsystem.domain Hello testsystem.domain [###.#.##.###], pleased to meet you
quit
221 2.0.0 testsystem.domain closing connection
Connection closed by foreign host.


8. Test connection to the Dovecot IMAP vaild user - i.e. "testmail" with password "testmail1"

Type the following three commands:

$ telnet testsystem.domain 110
$ user testmail
$ pass testmail1

Example:

$ telnet testsystem.domain 110
Trying ###.#.##.###...
Connected to testsystem.domain (###.#.##.###).
Escape character is '^]'.
+OK dovecot ready.
user testmail
+OK
pass testmail1
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.


9. Configure an E-mail client to test you IMAP Server

Outlook 2000

a. Open Outlook

b. Click Tools -> Accounts

c. Click the [Add] button then choose “Mail” to create a new account

d. Choose the Account Name and click the [Next] button

e. Verify the email address (i.e. wfmailer@dovecot host.com)

f. Click the (next] button

g. Choose IMAP for the incomping Mail server

h. Enter the Server Name into the “Incoming Mail Server” and “Outgoing Mail Server” fields

i. Click the [Next] button

j. Enter the Username(wfmailer) and Password

k. Click the [Next] button

l. Choose the LAN connection type

m. Click the [Next] button

n. Click the [Finish] button to save the settings

o. Click the [Close] button on the “Internet Accounts” screen

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete