Showing posts with label oracle linux. Show all posts
Showing posts with label oracle linux. Show all posts

Wednesday, February 13, 2013

IMAP on Oracle Linux 6

Hi there,

To enable IMAP on Oracle Linux 6, the steps are pretty simple.
  • Configure postfix. Edit /etc/postfix/main.cf
uncomment home_mailbox = Maildir/
add to the end of the main.cf file :
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
  •  restart service
#service postfix restart
  • Install dovecot
# yum install dovecot
  • enable the imap service
# vi /etc/dovecot/dovecot.conf
change from:
#protocols = imap pop3 lmtp 
to:
protocols = imap
  • edit /etc/dovecot/10-mail.conf
#vi /etc/dovecot/10-mail.conf
add
mail_location = maildir:~/Maildir
  • edit /etc/dovecot/conf.d/10-master.conf
change from:
unix_listener auth-userdb {
#mode = 0600
#user =
#group =
}
to
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
  •  edit /etc/dovecot/conf.d/10-auth.conf
# vi /etc/dovecot/conf.d/10-auth.conf 
disable_plaintext_auth = no 
auth_mechanisms = plain login 
  • check the status of the sevice
 [root@ol6 ~]# chkconfig --list dovecot
dovecot         0:off 1:off 2:off 3:off 4:off 5:off 6:off
  • enable it in case it was off
 [root@ol6 ~]# chkconfig dovecot on
  • start the service 
 [root@ol6 ~]# service dovecot start
Starting Dovecot Imap:                                     [  OK  ]
  • check the service is listening on imap port.. tcp 143 for imap, tcp 993 for imaps
[root@ol6 ~]# netstat -anp | egrep ':143|:993'
tcp        0      0 0.0.0.0:993                 0.0.0.0:*                   LISTEN      26394/dovecot    
tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN      26394/dovecot    
tcp        0      0 :::993                      :::*                        LISTEN      26394/dovecot    
tcp        0      0 :::143                      :::*                        LISTEN      26394/dovecot    
  • configure the firewall to allow incoming connections to 143 and 993 tcp if you have iptables running
  • done!
Now, let's test the system is running.

Dovecot will use a combination of user and password, so will check access for oracle user
  • send a test email to our user
# echo test | mail -s test oracle
  • install mutt mail client
#yum install mutt
  • set a password to a user, in order to test if you don't have a password yet
#passwd oracle
  • test dovecot imap
#mutt -f imap://server/user
  •  accept the certificate
(r)eject, accept (o)nce, (a)ccept always 

Done. 
Ok, not so simple, but pretty straightforward.

Dedicated to my friends on tcs india.

Alvaro.



acfs with uek2 kernel



  • get the latest OPatch. p6880880_112000_Linux-x86-64.zip
  • get oct 2012 cpu/psu patch p14275572_112030_Linux-x86-64.zip
  • get the acfs patch p12983005_112034_Linux-x86-64.zip
  • apply the OPatch on Grid Home
  • create a ocm.rsp file 
  • apply both patches first oct2012, then the acfs enabler as root (yes root)
become root
source your GRID
. oraenv
+ASM
apply the patches
#112034 Oct2012
$ORACLE_HOME/OPatch/opatch auto /u01/patch/14275572 -oh $ORACLE_HOME -ocmrf /u01/rsp/ocm.rsp
#acfs with uek2 on 112034
$ORACLE_HOME/OPatch/opatch auto /u01/patch/12983005 -oh $ORACLE_HOME -ocmrf /u01/rsp/ocm.rsp
  • create an acfsload service file
vi /etc/init.d/acfsload
#!/bin/sh
# chkconfig: 2345 30 21
# description: Load Oracle ACFS drivers at system boot
ORACLE_HOME=/u01/app/11.2.0.3/grid
$ORACLE_HOME/bin/acfsload start -s
  • enable and start the acfsload service
chkconfig --add acfsload
service acfsload start
now, become grid, and execute asmca