Saturday 27 August 2016

Set up Exchange Online as an SMTP Relay Using Windows Server 2012 / 2012 R2

Set up Exchange Online as an SMTP Relay Using Windows Server 

  1. Install Internet Information Services (IIS)
    1. In Server Manager, select Add Roles.
    2. On the Before you begin page in the Add Roles Wizard, select Next.
    3. On the Select Installation Type page, select Role-based or Feature-based installation.
    4. On the Select destination server page, choose Select a server from the server pool, and select the server that will be running SMTP services. Select Next.
    5. On the Select Server Roles page, select Web Server (IIS), and then select Next. If a page that requests additional features is displayed, select Add Features and then select Next.
    6. On the Select Role Services page, make sure that Basic Authentication under Security is selected, and then select Next.
    7. On the Confirm Installation Steps page, select Install.
  2. Install SMTP
    1. Open Server Manager and select Add Roles and Features.
    2. Select Server Selection and make sure that the server that will be running the SMTP server is selected and then select Features.
    3. On the Select Features screen, choose SMTP Server. You may be prompted to install additional components. If that’s the case, select Add Required Features and select Next.
    4. Select Install. After the installation is finished, you may have to start the SMTP service by using the Services snap-in for the Microsoft Management Console (MMC).
  3. Set up SMTP
    1. Open Server Manager, select Tools, and then select Internet Information Services (IIS) 6.0.
    2. Expand the current server, right-click the SMTP Virtual Server, and then select Properties.
    3. On the General tab, select Advanced > Add.
    4. In the IP Address box, specify the address of the server that’s hosting the SMTP server.
    5. In the Port box, enter 587 and select OK.
    6. On the Access tab, do the following:
      1. Select Authentication and make sure that Anonymous Access is selected.
      2. Select Connection > Only the List Below, and then specify the IP addresses of the devices that will be connecting to the SMTP server, such as printers.
      3. Select Relay > Only the List Below, and then specify the IP address of the devices relaying through this SMTP server
    7. On the Delivery tab, select Outbound Security, and then do the following:
      1. Select Basic Authentication.
      2. Enter the credentials of the Office 365 user who you want to use to relay SMTP mail.
      3. Select TLS Encryption.
      4. Select Outbound Connections, and in the TCP Port box, enter 587 and select OK.
      5. Select Advanced and specify SMTP.office365.com as the Smart Host.
  4. Restart the IIS service and the SMTP service.
After creating the required setting for the IIS SMTP relay, we will need to solve the additional issue that can describe as Enable the IIS SMTP relay to send mail on behalf another Email address.
For that u can create security group in office 365 and give Group delegation as the name of the account you used at authentication ( bold line). 

Please refer : http://o365info.com/smtp-relay-in-office-365-environment/