Monday, December 7, 2009

Sun Java Systems Messaging Server 6.3

Try to put some difficulties that i faced during sun java Messaging server 6.3 installation and configuration and the Solution that i found with the help of My friends and sun forums.


1) How to create a custom User Service package and custom Group Service pkage.


Most likely you will want to create your own service packages based on customized Class-of-Service templates with attribute values appropriate for the users and groups in your installation.

To create your own service packages, use the Class-of-Service templates stored in the da.cos.skeleton.ldif file, located in the following directory:

da-base/lib/config-templates

This file was created specifically for use as a template for writing customized Class-of-Service templates. It is not installed in the LDAP directory when Delegated Administrator is configured.

The da.cos.skeleton.ldif file contains a parameterized template for each Class-of-Service definition provided by Delegated Administrator:

standardUserMail

standardUserCalendar

standardUserMailCalendar

standardGroupMail

standardGroupCalendar

standardGroupMailCalendar

You can create your own Class-of-Service templates by using one or more of the parameterized templates in the da.cos.skeleton.ldif file.


http://docs.sun.com/app/docs/doc/819-4438/acfdj?a=view

2) Could not send mails Via Internet using Microsoft Outlook.

This happens because we have to add MAIL AUTHENTICATION to MS OUTLOOK. In sun java messaging server mail relaying is strictly prohibited by mapping files.
"
ORIG_SEND_ACCESS

tcp_local*tcp_local* $N$D30Relaying$ not$ allowed "


3) Again i had a problem of viewing the Mail queues,top addresses in the mail queue etc.
There is a command ,

" mail-srv-base/sbin/imsimta qm " This will direct you to a qm.maint> prompt

In help you can find many options. I'll put some usefull options.

*)qm.maint>sum
This will summarize the mail server queue processes

EX:

" qm.maint> sum
Messages
Channel Queued Size (Kb) Oldest
--------- -------- ----------- -----------------
tcp_local 0 0.00
tcp_intranet 0 0.00
tcp_auth 0 0.00
reprocess 0 0.00
process 0 0.00
ims-ms 0 0.00
---------- -------- ----------- -----------------
Totals 0 0.00
qm.maint>
"



*)qm.maint> top -to
This will give you the top recipient addresses if that recicient
address appear more than two times

*)qm.maint>top -from

This will give you the top senders addresses if that recicient
address appear more than two times
*)qm.maint>directory
This will list all the mails , mail IDs and the relevent channels.This
command will help to get tha mail ID

*) qm.maint>delete -channel= <-ALL / MSG ID>
From the directory command you can find the channel
names,number of mails, size of total mails in queue and Message ID.If
you put the Messade ID with delete command it will delete the relevent
message.If you put -all option,it will delete all the meessages in the
peticular channel.

*)qm.maint>read -channel=
This will help to read the Basic mail details.


4) We wanted to block mails receiving from out side domains to paticular addresses.

I did it with the help of sun forums by editing mapping files.Here i have put the entries that i edited


EX:
My Domain name is dodanwala.com. My email address is viraj@dodanwala.com
i want to Block all the Incomming mail from gmail,yahoo,hot mail etc. But need to get mail from dodanwala.com domain. We have to edit D#mailsrv-base/config/mappings file

"
ORIG_SEND_ACCESS

! src-channelfrom-addressdst-channelto-address
tcp_**@dodanwala.com*viraj@dodanwala.com $Y
tcp_local**viraj@dodanwala.com $N$D30Access$ denied$ to$ viraj@dodanwala.com


"
5)Our mail server got relayied by some SPAMMER and our mail queue got increased rapidly.
when i write this to http://forums.sun.com/ they tald to send the mail.log file.But i coulnt find any mail.log file in my log folder.
Then i found that we have to add some entry to D#mailsrv-base/config/imta.cnf file.
We have to add "logging " key word to the end of the following line.
EX:
-------------------------------------------------------------------------------------------------
!
! part II : channel blocks
!
defaults notices 1 2 4 7 copywarnpost copysendpost postheadonly noswitchchannel immnonurgent maxjobs 7 defaulthost echannelli
ng.com echannelling.com logging
-------------------------------------------------------------------------------------------------
After restarting the mail server i could fing the mail.log file. In the mail.log file we foung that some mails are using AUTHENTICATION to send mails.But those mails are not sending by our mail clients. The log loks like follows.
EX:

07-Dec-2009 16:16:45.57 tcp_auth tcp_local EEA 3 admin@telephase.com.au rfc822;heard@insaneofferz1.info heard@insaneofferz1.info
07-Dec-2009 16:16:45.57 tcp_auth tcp_local EEA 3 admin@telephase.com.au rfc822;heard16677@kinki-kids.com heard16677@kinki-kids.com
07-Dec-2009 16:16:45.57 tcp_auth tcp_local EEA 3 admin@telephase.com.au rfc822;heather.h.taylor@lowes.com heather.h.taylor@lowes.com
07-Dec-2009 16:16:45.57 tcp_auth tcp_local EEA 3 admin@telephase.com.au rfc822;heath01@mweb.co.za heath01@mweb.co.za
07-Dec-2009 16:16:45.57 tcp_auth tcp_local EEA 3 admin@telephase.com.au rfc822;heartlandvending@pixius.net heartlandvending@pixius.net
07-Dec-2009 16:16:45.57 tcp_auth tcp_local EEA 3 admin@telephase.com.au rfc822;heather.clark@railroadbazaar.com heather.clark@railroadbazaar.com
07-Dec-2009 16:16:45.58 tcp_auth tcp_local EEA 3 admin@telephase.com.au

we found EEA entry in the log.
E=successfully enqueued A=SASL Authentication used
To use SASL Authentication these SPAMERS mut know atleast on of our user ID and a Password.
To find the user name that they are using to use the mails i had to add some entry to option.dat file. that found in the config folder


To find out which account,add the following to your msg_base/config/option.dat file:

LOG_USERNAME=1

Then run:

./imsimta cnbuild;./imsimta restart

This will add the user id (prefixed with an asterisk character) which authenticated to the mail.log line. You can then track down any future deliveries to work out which account needs have their password changed
Then the output of the mail.log will be like follows.

------------------------------------------------------------------------------------------------------------
"
07-Dec-2009 20:16:06.12 tcp_auth tcp_local EEA 3 petrockt@live.com rfc822;cornishay07@yahoo.com cornishay07@yahoo.com *admin@domainname.com
07-Dec-2009 20:16:06.12 tcp_auth tcp_local EEA 3 petrockt@live.com rfc822;coronado_della@yahoo.com coronado_della@yahoo.com
*admin@domailname.com

"
-------------------------------------------------------------------------------------------------------------
Then easily we can track the user id that they are using and we can change the password of it.
6) Latest problem i faced was ,just after i change the store admin password our useres could not connect using HTTP web mail.
Finaly we managed to solve the problem with the help of http://forum.sun.com/ . Here i have posted the forum threads i used to solve that proble.
http://forums.sun.com/thread.jspa?threadID=5419202




Thanks goes to SHANE in the sun forums. and Aruna Premasiri in MIT