Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
cav-linux / opt / COMODO / doc / README.gateway
Size: Mime:
Configuring COMODO Mail Gateway (CMG) 'gateway' mode
------------------------------------------------------------------------


Prerequisites
--------------

* installed COMODO Antivirus for Linux
* installed MTA


Description
-------------
CMG can be configured to filter inbound and outbound email as SMTP gateway.

Below is a sample how it works:
1) CMG (IP 172.0.2.114) receives inbound emails via port 25 
and transmits them to local MTA(IP 172.0.2.116) via port 25.
2) Outbound emails are received initially by local MTA(IP 172.0.2.116), 
then are sent to CMG (IP 172.0.2.114) via port 20068 and after all 
are sent to their destinations.

   raw emails     |-------------|    scanned emails    |------------|
----------------->|25           | -------------------> |25          |   local emails
                  | cmgdaemon   |                      |local MTA   | ----------------> Maildir or mbox
  scanned emails  |[172.0.2.114]|   outbound emails    |172.0.2.116]|
<-----------------|        20068| <------------------- |            |
                  |-------------|                      |------------|

NOTE: If cmgdaemon and local MTA use the same ip address, they should listen on different ports.
The ports of cmgdaemon for listening inbound or outbound should be different.

NOTE: Connection to/from local MTA can be protected by SSL.
                                
                                

Configuring Exim as a local MTA
---------------------------------

Only need configure Exim to transfer outgoing emails to cmgdaemon.
1) Create file /etc/exim4/conf.d/router/04_exim4-config_comodo_router
with the following content:

########################################################################
# cmdoutfilter router
########################################################################
cmdoutfilter:
  driver = manualroute
  domains = !+local_domains
  transport = remote_smtp
  route_list = * 172.0.2.114::20068

NOTE:
This router must be the first router if you want to scan all mail.
"domains = !+local_domains" means that local emails will not be sent
to cmgdaemon.

2) Open /etc/exim4/update-exim4.conf.conf:

dc_use_split_config='true'



Configuring other local MTA
-----------------------------
You need redirect all non-local emails to relay SMTP,
where role of relay SMTP will perform CMG.
For example, for Postfix can be defined 'relayhost' in /etc/postfix/main.cf:
relayhost = 172.0.2.114:20068
mynetworks = 127.0.0.0/8 172.0.2.0/24



Configuring Of CMG
--------------------

Open "COMODO Antivirus" for Linux.
Select "Mail Gateway" tab.
Open "Smtp Configuration".
Set "Filtering Type": 'SMTP Gateway'

Select "Inbounding" tab.
 Set "Listening Port": 25(listening port of cmgdaemon)
 Set "Accept TLS": 'no'
 Set "Delivery Host": 172.0.2.116(IP address of local MTA)
 Set "Delivery Port": 25 (listening port of local MTA)
 Set "Force TLS": 'no'
 
Select "Outbounding" tab.
 Set "Listening Port": 20068(listening port of cmgdaemon)
 Set "Accept TLS": 'no'
 Set "Use MX lookup?": 'yes'
 Set "Force TLS": 'no'

It is possible to set parameters directly in /opt/COMODO/etc/COMODO.xml:

 <filteringType>inandout</filteringType>
 <inboundListeningPort>25</inboundListeningPort>
 <acceptInboundOuterTLS>no</acceptInboundOuterTLS>
 <inboundBackAddress>172.0.2.116</inboundBackAddress>
 <inboundBackPort>25</inboundBackPort>
 <outboundListeningPort>20068</outboundListeningPort>
 <enforceOutboundInnerTLS>no</enforceOutboundInnerTLS>
 <acceptOutboundOuterTLS>no</acceptOutboundOuterTLS>
 <outboundDestinationUseMX>yes</outboundDestinationUseMX>


Post-configuration steps
-------------------------

1) Restart CMG daemon:

service cmdmgd restart


2) Restart MTA:

Exim:
service exim4 restart

Postfix:
service postfix restart