|
- Only 1 NIC needed
- Install ClearOS in Standalone Mode
- Manually configure network settings
- Install the GUI, AntiMalware, AntiPhishing, SMTP and Mail Scanning modules.
- After reboot the basic setup wizard launches
- Set Language – Next
- Verify Network Settings – Next
- Set Timezone – Next
- Either leave default settings in Domain or type another domain name. But make sure this is NOT the same as any of your forwarded domains. I would just leave it set at the default clearos.loc – Next
- Enter all your organization info , leave Internet Hostname at default – Next
- Finished, click Firewall to get to the Firewall config in the Webconfig page.
- In the “Add Firewall Rule” section add the following “Standard Services”…SMTP, SSH and Webconfig as seen below.

- Click “Server” in the left menu pane to expand and then click “SMTP Server
- In the “Trusted Networks” section, delete all the networks that you do not have, and add yours if it was not there already. Don’t forget the /xx network mask.
- In the “Mail Forward Domain List” add all your domains and the IP of the messaging server responsible for that domain.
- DO NOT start the SMTP service yet.



- Then remove the check from the default entry and click the “Update” button.
- Then click the “Back” button to do the same thing to the next alias.

*****************************************************************************************************
- Launch your SSH client and SSH to your mail gateway and login.
- Add the following to the main.cf by typing
------------------------------------------------------------------------------------
cd /etc/postfix
postconf -e "local_transport = error:No local mail delivery" postconf -e "mydestination = "
postconf -e "relay_recipient_maps =”
postconf –e “relay_domains = hash:/etc/postfix/relay_domains”
nano relay_domains
-------------------------------------------------------------------------------------
- The “nano relay_domains” command open a new file named “relay_domains”
- Add all your domains space and “OK” as below.
mymaildomain.com OK
mymaildomain2.net OK
- Press CTRL/X then Y then Enter to save file.
- Type the following command…
------------------------------------------------------------
postmap relay_domains
------------------------------------------------------------
---------------------------
nano main.cf
---------------------------
- REM out the below lines at the bottom of the main.cf file if they exist.
---------------------------------------------------------------------------------
#unknown_local_recipient_reject_code = 550
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
---------------------------------------------------------------------------------
- Modify the “smtpd_recipient_restrictions” so it looks like below.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Press CTRL/X then Y then Enter to save file.
- Go back to the Webconfig page.
- In the left Menu Pane click “AntiMaleware” and click “Start” to start the service.
- In the left Menu Pane click “AntiSpam” and click “Start” to start the service. (You can play with the thresholds to get them to your liking)
- In the left Menu Pane click “SMTP Server” and click “Start” to start the service and then click “To Auto” to make the service start automatically on Boot.
- Click “Gateway” in the left menu pane to expand it.
- Click “AntiPhishing Configuration”
- In the main pane, enable “BlockSSL Mismatch” and “Block Cloaked URLs” then click “Update” button.
- Go back to your Putty session
- Type the following to tail your maillog and verify no errors.
-----------------------------------------
tail -f -n 300 /var/log/maillog
-----------------------------------------
- Test your SMTP server by telneting to port 25 from the command prompt on you computer.
----------------------------
telnet 192.168.1.2 25
----------------------------
- You should see the following…..
220 system.clearos.lan ESMTP Postfix
Done! Just redirect your port 25 to the IP of this server and you should be up and running. Although I would do some more testing like sending to each of your forwarded domains.
|