In these inflationary times, it’s always refreshing to find a technology solution that has actually decreased in price. To combat spam, hosting providers including Comcast and Spectrum have made it next to impossible to deploy a downstream mail server. So a relay hosting solution has become a must-have for VoIP server platforms including Incredible PBX. We’re thrilled to introduce MXroute’s $129 lifetime, cloud-based email hosting solution which supports unlimited domains, unlimited email addresses, and 10GB of storage. But you better hurry. This special won’t last long.
To get started with MXroute, you’ll want to spend some time in their tutorials making sure that you’ve properly configured DNS for the email domains you wish to host on MXroute. Pay particular attention to resolving DMARC, DKIM, and SPF issues before you go live. MXroute’s DNS support documentation is second to none.
For our part, we’ll show you how to configure Incredible PBX 2027 with Debian 11 or Ubuntu 22.04 to use MXroute as your email relay host so that email messages leave your server and arrive at their intended destinations without a hiccup or a SPAM flag. By default, Incredible PBX 2027-D and 2027-U servers are shipped with SendMail preconfigured and an enable-gmail-smarthost-for-sendmail script. Running the script assures proper delivery of outbound email so long as you use an existing Gmail account with a generated App password. But many prefer to cut the cord to Google and host their own email accounts, and that’s where we begin today.
To get started, sign up for an MXroute Unlimited Account. With your credentials in hand, log into the DirectAdmin web portal. Create your first email domain in Account Manager -> Domain Setup. Next, drop down to Email Manager -> Email Accounts and create an email account for the domain you created. Make note of the account password you use because you can’t retrieve it after you leave the creation step. You’ll see an arrow beside the newly created email account. It will take you to a functioning, web-based email client without having to enter your email account’s password. This email client can be used to send out test messages after you get the DNS settings for your domain squared away. Don’t continue with the Incredible PBX server setup below until you can successfully send and deliver a message from within the web-based email client with at least DKIM and SPF showing as PASSED in the original message listing for the delivered email message.
Incredible PBX Using MXroute As Smart Relayhost
What follows has been tested on Incredible PBX 2027 platforms deployed with Debian 11 or Ubuntu 22.04. It will not work with RedHat, CentOS, or Rocky 8 platforms which we no longer support. See this post for RedHat tips. Configuring your server to use MXroute as a smart relay host is a two-step process. First, we’ll replace SendMail with Postfix. And then we’ll set up MXroute as your email relay to avoid issues sending email from servers downstream from your Internet Service Provider, a.k.a. Comcast or Spectrum among others.
Replacing SendMail with Postfix on Incredible PBX
Begin by logging into your Incredible PBX server as root. Then issue the following commands:
systemctl stop sendmail systemctl disable sendmail apt-get update apt-get install postfix sasl2-bin libsasl2-modules -y dpkg-reconfigure postfix # choose NO Configuration option systemctl start postfix systemctl enable postfix sed -i 's|-c sendmail|-c postfix|' /usr/local/sbin/pbxstatus echo "incrediblepbx.com" > /etc/mailname sed -i 's|SendMail| Postfix|' /usr/local/sbin/pbxstatus systemctl status postfix
Deploying MXroute with Postfix
You’ll need three pieces of information to deploy MXroute as a smart relayhost with Incredible PBX: the name of your MXroute server (e.g. friday.mxrouting.net) and both the email address and password of an active account on MXroute (e.g. email@example.com & mypassword).
With these in hand, edit and save /etc/postfix/main.cf after adding the following to the bottom of the file using your actual MXroute server name in the first line. Leave the brackets in place.
relayhost = [friday.mxrouting.net]:587 smtp_use_tls = yes smtp_tls_security_level = encrypt smtp_sasl_tls_security_options = noanonymous smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt header_size_limit = 4096000
Next, create an /etc/postfix/sasl_passwd file with your three credentials:
Finally, issue the following commands to complete the setup:
chmod 600 /etc/postfix/sasl_passwd postmap /etc/postfix postmap /etc/postfix/sasl_passwd systemctl restart postfix systemctl status postfix
Testing Email with MXroute and Postfix
As a security precaution, you can only send emails through MXroute using the email address registered with Postfix as your Reply-TO address. From the command line, your outbound email should look like this:
echo "test" | mail -r firstname.lastname@example.org -s testmsg email@example.com
Also be sure to adjust the FROM address for outbound voicemail messages in the FreePBX GUI. Login as admin and enter your Sender Identity Email Address in the Server Email field in Settings -> Voicemail Admin -> Settings -> Email Config.
Originally published: Monday, September 25, 2023
Need help with Asterisk? Visit the VoIP-info Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.