Wednesday, 18 May 2011

Configure TrendMicro IMSS To Work With Messaging Server On The Same Server

If you going to use a mail system you need of course an anti-spam and anti-virus software to complete your mission and one of that software’s that I had worked with is IMSS (Internet Messaging Security Suite) from TrendMicro Company.
As imss include optionally in the time of installation postfix software, and different feature depends in the intended usage, there will be more than one method to use imss with Messaging server.

Scenarios to connect IMSS with Messaging Server:

  • use imss as front-end (the software that will receive emails, specifically the software is Postfix), and forward the emails automatically to Messaging server in the case that the email is inteted to be for local domain, or forward the email to outside if the email intended to be for outside destination.
  • Use messaging server as front-end, and forward the emails to imss using messaging server channel.
To accomplish this you need:
  1. Decide weather to use imss as front-end or back-end.
  2. Install imss with Postfix (imss is front-end) or not (imss is back-end) depending in your usage.
  3. Connect imss to Messaging server.

Configure IMSS as front-end:

to install imss as front-end , you need to install Postfix also, (because Messaging server is not supported as MTA for IMSS), and from the administration Port of imss you need to modify imss to relay emails to your local domain which is served by Messaging server:
First thing you need is to do is to configure messaging server to listin to port other than 25, as imss going to listen to this port:
1- cp -p /opt/sun/comms/messaging64/config/dispatcher.cnf  /opt/sun/comms/messaging64/config/dispatcher.cnf.ORG 
2- vi /opt/sun/comms/messaging64/config/dispatcher.cnf:
And change:
[SERVICE=SMTP]
PORT=25
To
[SERVICE=SMTP]
PORT=2525
3- /opt/sun/comms/messaging64/sbin/imsimta cnbuild
4- /opt/sun/comms/messaging64/sbin/stop-msg
5- /opt/sun/comms/messaging64/sbin/start-msg
6- Go to the management of IMSS software:
https://server_ip:8445
And configure postfix to work in port 25,then configure emails forwarding to your local domain:
Administration -> IMSS configuration -> SMTP Routing -> Domain-based delivery -> add :
In the shown box enter the name of your local domain and enter the ip of the Messaging server ip and the port SMTP listening to.
Now the received emails should be received by postfix , scanned by imss, and forwarded to messaging server.

Configure IMSS as Backend :

To set imss as back-end, then you do not need to install postfix and therefore you will lose ipfilter feature of imss, which provide you with more advanced spam and virus protection solution, and to accomplish this:
1- Install imss only (when you are asked to install postfix chose no ).
2- Open new channel in messaging server to send emails to imss ( upstream and downstream connection methodology)
cp -p /opt/sun/comms/messaging64/config/imta.cnf /opt/sun/comms/messaging64/config/imta.cnf.ORG
vi /opt/sun/comms/messaging64/config/imta.cnf
add this new channel:
!
! tcp_scanner
tcp_scanner SMTP nomx single_sys identnonenumeric subdirs 20 maxjobs 7 daemon 127.0.0.1 port 10025 enqueue_r
emoveroute
tcp_scanner-daemon
And in every channel you need to scan emails in add:
aliasdetourhost tcp_scanner-daemon
3- make messaging server receive emails in port 10026 ( the emails that already scanned by imss and sent back to messaging server )
cp -p /opt/sun/comms/messaging64/config/dispatcher.cnf /opt/sun/comms/messaging64/config/dispatcher.cnf.ORG
vi /opt/sun/comms/messaging64/config/dispatcher.cnf
add :
[SERVICE=SMTP_SCANNING]
PORT=10026
IMAGE=IMTA_BIN:tcp_smtp_server
INTERFACE_ADDRESS=127.0.0.1
!LOGFILE=IMTA_LOG:tcp_scanner_server.log
PARAMETER=CHANNEL=tcp_scanner
STACKSIZE=2048000
4- make channel conversions:
cp -p /opt/sun/comms/messaging64/config/mappings /opt/sun/comms/messaging64/config/mappings.ORG
vi /opt/sun/comms/messaging64/config/mappings
add:
CONVERSIONS
   IN-CHAN=tcp_scanner;OUT-CHAN=*;CONVERT   No
   IN-CHAN=tcp_;OUT-CHAN=;CONVERT   Yes,Channel=tcp_scanner
5- /opt/sun/comms/messaging64/sbin/imsimta cnbuild
6- /opt/sun/comms/messaging64/sbin/stop-msg
7- /opt/sun/comms/messaging64/sbin/start-msg
now the emails that are sent are received by messaging server, scanned by imss.

No comments:

Post a Comment