Guide to setting up a mailserver on LINUX

How to setup Hexamail Server email server on LINUX

    This is a guide to setting up your own mailserver on a LINUX machine.

    Let's break the guide into some easy steps:

Preparing

    You will need:

    • - a computer with plenty of diskspace (you probably want to store all email on the server as well as on your email clients)
    • - an LINUX operating system (for example Centos 5 or 6, Ubuntu, RedHat etc)
    • - a permanent/reliable connection to the Internet

Installing

    Next you need to download the required software and copy it to your mailserver computer.

    • 1) Download Hexamail Server and save the tar.gz file and the license (you receive via email) onto the computer
    • 2) Unpack the hexamailserver.tar.gz file using the command
    • tar xvfz hexamailserver.tar.gz
    • 3) This creates a subfolder called hexamailserver/ in which Hexamail will run. You can move this folder wherever you wish at this point
    • mv hexamailserver /data/mailserver/
    • 4) Switch to the extracted folder
    • cd hexamailserver
    • 5) View the INSTALL text file for the latest specific instructions for your version of the software
    • more INSTALL

Configuring Essential Settings

    Now you can begin configuring Hexamail Server. After some initial steps you can use the webadmin to configure the rest of the settings

    • 1) Copy the file hexamailserver.cfg.initial to hexamailserver.cfg
    • cp hexamailserver.cfg.initial hexamailserver.cfg
    • 2) Edit the file hexamailserver.cfg
    • vi hexamailserver.cfg
    • 3) Fill in all the required settings listed in the file
    • [Service] // REQUIRED: This is the list of allowed IP addresses that can connect to your s erver for administration using the remote windows administration console. AllowedIPList=127.*.*.* [Administrator] // REQUIRED: This is the password required to use any administration interface Password= [WebAdmin] // REQUIRED: This is the list of allowed IP addresses that can connect to your s erver for administration using the webadmin. AllowedIPList=127.*.*.* // REQUIRED: This is the TCP network port used for webadmin. Port=880

Running for the first time

    Now you can run Hexamail for the first time

    • 1) Switch to the root user. This is required to allow Hexamail to use the ports required for email (port numbers under 1024)
    • su
    • 2) Run the script ./start.sh provided with the software to start the Hexamail service
    • ./start.sh
    • 3) Verify there are no problems with the startup by checking the Hexamail Server log. It should eventually say Starting processing...
    • tail -f logs/Hexamail Server.log
    • 4) You are now ready to connect to the webadmin and configure the other settings. To do this open a browser to http://yourservername:880/
    • If it is on this server use this link webadmin

Configuring Hexamail Server

    The configuration settings are now the same as in the Windows Administration and you can use the same help file to read about the various options in the Administration sections here: Hexamail Server Help

    In the WebAdmin press the help button on the page you are using to see help relating to that specific page of settings.

    Web Admin Spam Blocker Help Button

    Alternatively you can configure most of Hexamail using the configuration file directly using the instructions in the Configuration section here: Hexamail Server Help

Connecting to Hexamail Server

    Hexamail Server is a full-featured mailserver and can offer various services to email and calendar clients.

    Here is a list of services and the ports that need to be opened on your firewall/router to access each service

    ServiceProtocolPortModuleDescription
    Send/Recv MailSMTP25Used to send email to your server by other servers and send outbound email from email clients. NOTE some ISPs will block this port so clients may need to send via the ISP provided smarthost/smtp server or use SSL or an alternative SMTP port
    Send/Recv MailSMTP (SSL)465Used to send outbound email from email clients securely. Use the SSL setting in your mail client and specify port 465 if your ISP is blocking port 25
    Check EmailPOP3110Used to download email from your server by email clients using the POP3 protocol
    Check EmailPOP3 (SSL)995 Used to download email from your server by email clients using the secure POP3 protocol
    Check EmailIMAP143IMAP ServerUsed to download email from your server by email clients using the IMAP protocol
    Check EmailIMAP (SSL)993IMAP ServerUsed to download email from your server by email clients using the secure IMAP protocol
    Check EmailWebmail8080*WebmailUsed to check email using a web-browser
    Check EmailWebmail (SSL)443*WebmailUsed to check email using a web-browser
    Sync Calendar/TasksCALDAV8080*CalendarUsed to synchronize calendar clients using the CALDAV protocol
    Sync Calendar/TasksCALDAV (SSL)443*CalendarUsed to synchronize calendar clients using the secured CALDAV protocol
    Sync Calendar/TasksSyncML8080*SyncML+CalendarUsed to synchronize calendar clients using the Syncml protocol
    Sync Calendar/TasksSyncML (SSL)443*SyncML+CalendarUsed to synchronize calendar clients using the secured Syncml protocol
    Remote AdministrationHTTP23006Used for remote administration using the Windows Administration console
    Web AdministrationHTTP880*Used for remote administration using the Web Administration
    Developer AccessHTTP1880*DeveloperUsed for developer access via REST/json from languages such as Javascript, Python, .net etc.

    In your firewall you should allow incoming TCP connections for each port listed that you require, and in your Router/NAT device setup a rule to forward TCP traffic on the listed ports to the computer running Hexamail

    * As configured in your configuration file or administration interface, default settings are shown