If you don't specify an SMTP server under Control Panel->Email Service, CentreStack will default to Amazon SES for sending all of its email notifications, including but not limited to user welcome emails, share notifications, password reset warnings, etc. This works but your emails will display a FROM field from email@example.com and will be subject to some usage limits. If you want to change this, you will have to setup your own SMTP server in IIS, or go with a paid third-party service such as SendGrid. Most third-party email services have convenient features, such as built-in management of opt-out emails and server blacklisting protection (because you won't be using your own servers). If, however, you are just starting out with a few users and don't need to send out a lot of emails, perhaps an extremely simple SMTP setup on the same server as CentreStack may be adequate enough to handle your CentreStack notifications.
Please note that IIS and SMTP setup are not part of CentreStack, so Gladinet cannot offer customer support for such topics. Please set up and run your own SMTP server at your own risk.
Steps to Install SMTP on Windows Servers
1-Install IIS 6 Management from your Server Manager Dashboard->Add roles and features
2-Install SMTP Server from Add roles and features->Features
3-Once the two items above are installed, start IIS 6 from the Windows Control Panel->System and Security->Administrative Tools
4-Right-click on your server name and choose to create a New->SMTP Virtual Server...
5-Finish the wizard to create your SMTP server
6-Now, secure the SMTP server so only CentreStack can relay messages through it. To do so, open the properties window and go to Access->Relay restrictions. Add the 127.0.0.1 to the list of "Only the list below." This will allow relays from localhost.
7-You can optionally perform the same steps above to the Access->Connection... page for extra security
8-For the Access->Authentication, you can leave it on Anonymous access for simplicity (since you are only allowing relays from this machine anyway).
9-It doesn't hurt to enable logging from the General tab. This will help you to diagnose issues:
10-Now you can test it. Open Powershell and type the following:
Send-MailMessage -SMTPServer localhost -To firstname.lastname@example.org -From email@example.com -Subject "Test from PS" -Body "test"
Replace the firstname.lastname@example.org emails with own your emails...
11-Here is what the test email looks like in Gmail (original message).
Once you receive the email, you will see that you need to set up an SPF policy on your domain name so your emails from this SMTP server don't get flagged as SPAM. In the example above, my FROM was "email@example.com." Therefore, if I was the owner of mailinator.com, I would log in to my domain manager and add my CentreStack server's public IP address to a TXT record in the DNS host records like this:
"v=spf1 ip4:XXX.XXX.XXX.XXX ~all"
Replace XXX.XXX.XXX.XXX with your own information...
Please note that some emails, such as file sharing notifications actually use the CentreStack sharer's email address at the time of this writing. Other system emails will use the FROM specified in the SMTP settings. Therefore, it is a good idea to request that all of your registered client's add an SPF record like the one above in their domain names' DNS records regardless if your CentreStack has a custom SMTP specified or not.
SPF records need to abide by strict rules, so if you want to test your syntax, I recommend these awesome free tools:
- https://www.spfwizard.net (SPF creation wizard)
- https://mxtoolbox.com/spf.aspx (SPF Syntax checker)
- https://www.whatsmydns.net (DNS propagation checker)
12-Once you are all set up and your test emails don't raise any spoofing flags due to your custom FROM, go to your CentreStack's Tenant Dashboard->Control Panel->Email Service and enter "localhost" on port 25 without authentication required. Then, add your custom from in the From Field textbox.
If you run into any issues, a network packet sniffer like WireShark while performing the Powershell test above might help you to diagnose the source of the issue.
Article is closed for comments.