How can I redirect mail from my server to a relay mail server? (AZURE)

EDITED :

I am quite new in this and I found out that when you send an email to [email protected] the mail is sent to the ip address of fish.com and whatever server is hosted there should do the work of redirecting or processing the mail.

I have a web role (website) on azure which holds the content of myweb.com .

The thing is, I do not know how to configure the re-direction on that server. I know you could add an MX record on the server but azure does not give me that option since in azure there is a load balancer exposing the public ip and we have no access to it.

I do have a mail relay service which I hired to redirect the email but I dont know where to configure the re direction on azure.

Maybe there is a way to configure this in web.config inside the visual studio solution?

Upvotes: 1

Views: 412

Answers (3)

Alexander Galkin
Alexander Galkin

Reputation: 12524

In order to redirect a mail with webrole on Azure you either

  • have to configure DNS so that the mailserver is located somewhere outside of Azure, or
  • receive the incoming mail and send it further to a new recipient.

The first approach has nothing to do with Azure.

The second approach is not possible, for even though you can send a mail from your service by using SendGrid, as it was pointed out by Matt Johnsohn, there is no possibility to host an SMTP server in your webrole. Webrole itself is hosted within IIS and the latter provides its own bindings for SMTP, FTP and some other protocols. You can host a WCF service within your webrole instance that would use net.tcp binding for connection -- but you will not be able to bind the port 25 required for standard SMTP connection.

Upvotes: 0

Matt Johnson-Pint
Matt Johnson-Pint

Reputation: 241450

Don't use direct SMTP. You will have much better results with a service like SendGrid.

Microsoft has a special deal for free SendGrid service (<= 25,000 per month) for Windows Azure customers, so there's no reason not to use it.

http://www.windowsazure.com/en-us/develop/net/how-to-guides/sendgrid-email-service/

Upvotes: 2

viperguynaz
viperguynaz

Reputation: 12174

Redirection and MX records don't have anything to do with Azure - you setup MX records to handle your mail where ever your DNS is hosted.

Upvotes: 0

Related Questions