---
title: Can I install SecurityGateway and MDaemon on the same machine?
description: It is possible to install SecurityGateway and MDaemon on the same machine. Configuration changes will need to made to default ports, spam filter, and antivirus settings.  These changes are detailed below.
---

[Skip to content](https://knowledge.mdaemon.com/install-securitygateway-mdaemon-same-machine#main-content)

[![](https://knowledge.mdaemon.com/hs-fs/hubfs/MDaemon-Technologies_logo.png?width=200&height=150&name=MDaemon-Technologies_logo.png)](https://mdaemon.com/)

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)

Open main navigation

Close main navigation

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)
- [Contact Us](https://mdaemon.com/pages/contact-us)

[Contact Us](https://mdaemon.com/pages/contact-us)

 Knowledge Base

- There are no suggestions because the search field is empty.

1. [Knowledge Base Home](https://knowledge.mdaemon.com/?hsLang=en)
2. [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)

# Can I install SecurityGateway and MDaemon on the same machine?

## It is possible to install SecurityGateway and MDaemon on the same machine. Configuration changes will need to made to default ports, spam filter, and antivirus settings. These changes are detailed below.

By default, MDaemon and SecurityGateway listen for SMTP on ports 25, 465 (if SSL is enabled for SMTP), and 587 (the MSA port). You will need to change MDaemon's ports so SecurityGateway can listen on them. To do so, open the MDaemon console and follow these steps:

1. Click **Setup**
2. Click **Server Settings**
3. Expand **DNS & IPs**
4. Select **Ports**
5. Change the SMTP ports to an unused port: 
     1. SMTP inbound port
     2. SMTP outbound port
     3. MSA inbound port
     4. SMTP SSL port
6. Click **OK**

If you want your local users to send outgoing mail through MDaemon rather than through Security Gateway, then you will need to instruct users to configure the port their mail client will need to use in order to send mail.

This configuration recommends disabling MDaemon's spam filter (MDSpamD.exe). SecurityGateway includes its own anti-spam daemon, SGSpamD.exe. Both MDSpamD and SGSpamD are based on SpamAssassin, however, there are differences in the rule sets that prevent them from being interchangeable, so they cannot both use the same configuration.

To disable MDaemon's Spam Filter, open the console and follow these steps:

1. Open the MDaemon configuration session (GUI).
2. Click **Security**
3. Click **Spam Filter**
4. Select **Spam Filter** in the Spam Filter window
5. Uncheck **Enable Spam Filter**
6. Click **Apply**

To disable Bayesian Learning in MDaemon:

1. Open the MDaemon configuration session (GUI).
2. Click **Security**
3. Click **Spam Filter**
4. Click **Bayesian Classification**
5. Uncheck **Enable Bayesian classification**
6. Click **OK**

If MDaemon Antivirus has been deployed, both it and Outbreak Protection should be disabled.  The same Antivirus engines and Outbreak Protection feature in MDaemon are enabled in SecurityGateway.

1. Open the MDaemon configuration session (GUI).
2. Click **Security**
3. Click **AntiVirus**
4. Disable **Enable AntiVirus scanning**
5. Disable **Use the ClamAV egnine to scan messages**
6. Disable **User the Ikarus AV engine to scan messages**
7. Click **OK**

Follow these steps to disable Outbreak Protection in MDaemon:

1. Open the MDaemon configuration session (GUI).
2. Click **Security**
3. Click **Outbreak Protection**
4. Disable **Enable Outbreak Protection**
5. Click **OK**

- [MDaemon Email Server](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#main-content)

    - [Mobile Device Management](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#mobile-device-management)
- [MDaemon AntiVirus (SecurityPlus)](https://knowledge.mdaemon.com/mdaemon-antivirus-securityplus?hsLang=en)
- [ActiveSync for MDaemon](https://knowledge.mdaemon.com/activesync-for-mdaemon?hsLang=en)
- [MDaemon Connector for Outlook (Outlook Connector)](https://knowledge.mdaemon.com/mdaemon-connector-for-outlook-outlook-connector?hsLang=en)
- [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)
- [RelayFax Network Software](https://knowledge.mdaemon.com/relayfax-network-software?hsLang=en)

[![Chill listening crop-3](https://knowledge.mdaemon.com/hs-fs/hubfs/belch.io/template-assets/MDaemon-Technologies_logo.png?width=199&height=41&name=MDaemon-Technologies_logo.png "Chill listening crop-3")](https://www.mdaemon.com)

[Knowledge Base Home](https://knowledge.mdaemon.com?hsLang=en)

<https://www.youtube.com/c/MDaemonTechnologies> <https://www.linkedin.com/company/mdaemon-technologies/> <https://www.facebook.com/MDaemon.Technologies/> <https://www.twitter.com/MDaemon_Email>

Copyright © 2025, MDaemon Technologies