SoftXS Email Server Setup and Configuration
Email Domains Controlled by SoftXS
The email server currently processes email for the following domains:
softxs.ch - SoftXS
salandra.net - Sandra Largo
incawatt.com - Geraud Soubrier Active
SoftXS additionally owns/controls the following domains:
works-organiser.ch - SoftXS
works-organiser.com - SoftXS
works-organizer.ch - SoftXS
works-organizer.com - SoftXS
incaplan.ch - Geraud Soubrier
incaplan.com - Geraud Soubrier
incawatt.ch - Geraud Soubrier
jkaelin.ch - Joseph Kaelin
to do - list the companies and DNS configuration details for each domain name
Current Email Server Configuration (2014-10)
The idun.softxs.ch email server is the ONLY server we have that can receive email
We have no backup email servers!
Hardware and Operating System
- Name: idun.softxs.ch
- Located at AH apartment on a relatively slow incoming connection
Hardware: IBM NetVista with 8 GB physical memory & 8 GB swap space
- 2 x 3 TB WD gmirrored disks
- OS: FreeBSD 9.1 (December 2012)
- Sendmail Version 8.14.5 (2011-05-17)
Services Provides by Email Server
- Incoming email reception including delivery to local mailboxes
- Outgoing email delivery
- IMAP access
- Storage (25GB) email in folders for local users (alan, tibor, etc.)
- 14G - alan
- 6.5G - geraud
- 108M - james
- 269M - jjk
- 3.1G - sandra
- 575M - tibor
- TLS (security certificate)
- Spamassassin spam filtering
Specification for New Email Server
- Postfix based mail processing
- Must have ability configure automatic forwarding of emails to V2 project systems
- Email server in an Ubuntu-based VM, initially deployed on server in Cham data center
- At least one backup email server setup, not in the Cham data center
- [need to decide if backup server buffers or forwards to the primary server]
- All setup and configuration scripted using Puppet
- Including setup of forwarding to V2 specific systems
- Ideally only a single configuration entry will be need for forwarding V2 project email. E.g.:
- All mail to {name}@{project}.works-organiser.ch is sent to V2 system {name}
- Each V2 system must have catch-all folder for filing emails with an unknown {name}
- Use virtual users for all local mail recipients (alan, tibor, sandra, geraud, etc)
- IMAPS access for email recipients
Implementation Plan
Phase I - Proof of Concept Mail Server
- Setup Ubuntu-based VM with Postfix and other required packages
- Initially setup works-organiser.com
- Setup port forwarding via the firewall
- This will require a major change to the current host system setup, which uses rinetd, etc.
- Setup MX records for work-organiser.com
- Configure Postfix to receive email for domain work-organiser.ch
- Setup TLS
- Setup spam filtering
- Setup IMAPS
- Configure Postfix to receive email for the domain works-organiser.ch
- Setup a test virtual user to receive all mail for the domain
- Test sending email
- Configure Post fix to receive email for sub-domains for works-organiser.ch
- Setup project based forwarding for sub-domain mail
- Call a simple script
- Call a V2 script - Verify that email
- Setup project based forwarding for sub-domain mail
Phase II - Implement Production Server
- Re-script the deployment to a VM on the zg-3 server
Phase III - Migrate Local Users
Migrate sandra@salandra.net
Migrate geraud@incawatt.com
- Migrate all softxs.ch email users
Phase IV - Setup Backup Email Server
- Decide where to host the backup server
- Decide whether to buffer or forward email
- Re-script deployment of server
Current state (as of 2017-03-14)
- The main SMTP server for softxs.ch is on idun (FreeBSD 9.1) with sendmail. Configuration manually.
- The deployment to the VM smtp1 on zg-3 is done (Ubuntu 12.04.5 LTS) with postfix. Configuration is handled by puppet. All VMs on zg-3 are using this mail server as relay host.
- The zg-1 server still an old FreeBSD 8.0 with sendmail and simple manual configuration. It is set with SMART_HOST mbox.softxs.ch (=smtp.softxs.ch)
Problems
- Postfix on VM smtp1 can not decide if an SMTP call is received from our servers or from outside, because all external (not from VMs on zg-3) SMTP calls are forwarded through rinetd on zg-3, causing all source addresses be the IP address of zg-3. Therefore relaying can not enabled generally.
There are some email domains, which can not be reached from idun, because the IP address is blacklisted by their providers via the BaraccudeCentral spam vlacklist. This was corrected on 2017.03.14, and the configuration for the work-around shown below was disabled on 2017.03.20.
To workaround this problems, currently the critical domains added manually to the configuration on postfix on smtp1 as:
relay_domains = opb.de obermeyer-ae.com
And on zg-1 in /etc/mail/zg-1.softxs.ch.mc as:
FEATURE(`mailertable')
and in /etc/mail/mailertable as:
opb.de smtp:smtp1.softxs.ch obermeyer-ae.com smtp:smtp1.softxs.ch
Note that after configuration changes run "service postfix restart" on smtp1 and "make all; make install; make restart" on zg-1.
Configuration in transition state implemented at 2017-04-05
- New SMTP server as a VM on zg-2, namely smtp2. This server is responsible for all outgoing emails and later for incoming emails for our domains.
Configured using the puppet module postfix_server_primary.
Note: mydestination in main.cf has to contain all of our domains the mailboxes to be handled on smtp2 for.
- New SMTP server on the zg-2 base machine. This server is a relay server for all VMs on zg-1, zg-2 and zg-3 and later for the outside world, but only for our domains.
Configured using the puppet module postfix_satellite with relaying options set.
Notes:- No rinetd is running on zg-2, so all SMTP connection request to smtp2.softxs.ch is handled by zg-2
- Relayhost is given with the internal IP address 172.16.1.5 because smtp2.softxs.ch would point to zg-2.softxs.ch causing self reference
Mail Routing Examples
Mail from zg2t1.softxs.ch to nagyt@hu.inter.net
zg2t1.softxs.ch (relayhost = smtp2.softxs.ch) --> zg-2.softxs.ch (relayhost = 172.16.1.5) --> smtp2.softxs.ch (relaying to hu.inter.net)
Mail from zg2t1.softxs.ch to tibor@softxs.ch
zg2t1.softxs.ch (relayhost = smtp2.softxs.ch) --> zg-2.softxs.ch (relayhost = 172.16.1.5) --> smtp2.softxs.ch (will be saved later in mailbox)
List Hosting Providers for Backup Email Server
Goal is to try another local ISP to reduce our dependency on datawire.ch
- hosteurope.ch, located in D4 Technopark (near Luzern)
- Dedicated VM-based servers: 15-20 CHF/month
- Larger serves (48-128 GB): 60-170 CHF/month