Setting Up Mail Relays for SendGrid in Windows
Can you use your Rackspace Cloud Server as a Mail Server?
Since Rackspace uses dynamically assigned IP addresses for Cloud Servers, the IP space has been declared unfit for email use. This means that major blacklist providers have stated that email coming from cloud servers should not be accepted. For this reason, email from Cloud Servers may not reliably get through to your intended recipients.
Options for Sending Email from a Cloud Server
- One option to allow you to send email reliably in conjunction with your Rackspace services, we recommend you sign up for a Rackspace Email account (http://www.rackspace.com/apps/email_hosting/) or any email account that allows you to send email via secure SMTP authentication. We can then configure your server to send email through that account. This way, you are still able to send mail and avoid these issues.
- Another option for Rackspace customers is to take advantage of a special promotion we are running with a 3rd party company, SendGrid, to to allow you to send up to 40,000 free emails per month.
- If you choose to use this service in conjunction with one of our Windows Cloud Servers, you will need to configure your Microsoft IIS settings to relay email to the SendGrid servers.
- To modify your mail relay settings for a Windows server running IIS 7, you will use appcmd.exe - the command line tool for configuring IIS 7.
Using appcmd.exe to configure mail relay settings in IIS7
- First you will need to sign up for the Send Grid promotion. Make note of the username and password that you specified when creating your SendGrid account, because you will need that information to correctly configure your mail relay settings.
- Next you will need to provision a Cloud Server running Windows Server 2008, log in remotely using Remote Desktop, and install IIS 7.0 services.
- To run appcmd.exe and configure your mail relay, open the Command Prompt, then modify and run the command listed below from the Command Prompt:
Appcmd.exe Mail Relay Command
%systemroot%\system32\inetsrv\appcmd.exe set config /commit:WEBROOT /section:smtp /from:firstname.lastname@example.org /deliveryMethod:Network /network.port:587 /network.defaultCredentials:False /network.host:smtp.sendgrid.net /network.userName:username_changeme /network.password:password_changeme
Once you have your Send Grid account activated and your credentials available, there are three sections of this command you will need to modify.
/from:email@example.com (change this email address to the appropriate 'reply to' address for your sending domain or use firstname.lastname@example.org)
/network.userName:username_changeme (Update the username to the one you specified when setting up your SendGrid account)
/network.password:password_changeme (Update the password to the one you specified when setting up your SendGrid account)
Tip: It may be helpful to copy/paste this command into notepad on your server, make your modifications, and then paste the command into the Command Prompt.
- When you have modifed the appcmd.exe command to include your mail relay credentials, type the entire command at the command prompt (generic command text is pictured below, but yours should reflect the three changes specified above).
- Press 'Enter' and you should see a response like the one below, confirming that the configuration changes have been applied:
- If you do not receive a message stating that the configuration changes were applied, then check your command line again to ensure that the command was entered correctly. If you are still having trouble relaying email through Send Grid, please contact Rackspace or Send Grid support.
© 2014 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER