SMTP Relay for Office 365

Posted: October 20, 2017 in Office365

I recently had a customer that needed to send scanned documents from a multifunctional printer to Office365:

  • Check to see if the Printer supports TLS (needed to send to Office 365)

In this case the printer did not, so I had to go to plan B:

  1. Create SMTP Server
  2. Configure Office 365 Connector

 I.  Create SMTP Server

In this scenario I used Windows Server 2012 R2 in a Hyper-V Environment.4-Hyper-V-Server

A. SMTP Feature

  • Open the Add Roles and Features Wizard

5 - Add-Roles-Features

  • Click Next

6-Role-based-or-feature-based-install

  • Click Next

7-Select-Destination-Server

  • Click Next

8-Server-Roles

  • Select SMTP Server on Features

9-Features

  • Click on “Add Features”

10-SMTP-Feature

  • click Next

11-SMTP-Feature

  • Click Next

12-Web-Server-Role-IIS

  • Click Next

13-Role-Services

  • Click Install

14-Confirmation

  • When Installation finishes click “Close”

15-Results

B. Configure SMTP Server

  • Open IIS 6.0 Console

16-IIS-6-0-Console

  • Expand SMTP (Local Computer)

17-SMTP-Server

  • On SMTP Virtual Server Properties go to Access Tab

19-SMTP-Properties-Access

  • On Access Tab open “Authentication”
  • Anonymous access must be checked
  • Click OK

20-SMTP-Access-Authentication

  • On Access Tab open “Relay”
  • Add the devices IP that will use this server as SMTP Relay.
  • Click OK

21-SMTP-Access-Relay

  • Open Delivery Tab

21-SMTP-Delivery

  • On Delivery Tab, Open Security and select “Basic Authentication”
  • input the information of the Service Account created for this task.
  • “TLS encryption” (without TLS Office 365 will deny the relay)
  • Click OK

21-SMTP-Delivery-OutBound-Security

  • Open Outbound Connections
  • Change the TCP Port to: 587 (default Office 365 port)
  • Click OK

22-SMTP-Delivery-OutBound-Connections

  • Open Advanced Delivery
  • Input the “Fully-qualified domain name” for the Server
  • Input the Office365 Smart host: SMTP.OFFICE365.COM
  • Click OK

23-SMTP-Delivery-Advanced-Delivery

  • Return to the SMTP Virtual Server Properties Access Tab
  • TLS requires a certificate.

22-SMTP-Properties-Access-SecureComm

C.  Configure Secure Communication (TLS)

  • Open IIS 7.0 Console

23-IIS-7-0-Console

  • Click on the SMTP Server
  • Select Server Certificates

24-IIS-7-0-Console

  • Select Create Self-Signed Certificate

25-IIS-Manager-Server-Certificates

  • Specify the friendly name for the certificate
  • Personal must be selected for the Certificate Store

26-IIS-Manager-CreateSelfSignedCert

  • Close the IIS 7.0 Manager Console

27-IISManager_ServerCertificates-WebHosting

  • Go back to IIS 6.0 Manager Console
  • Open the SMTP Virtual Server Properties
  • Select the Access tab “A TLS certificate is found with expiration date…”
  • TLS is now enabled and ready to be used.

27-IISManager-TLS-Available

D.  Test SMTP Server

  • To test SMTP server i will use putty to connect to smtp server
  • remember when using telnet SMTP requires port 25

28-SMTP-Server-TEST-1

>helo

>MAIL FROM:  %address of Service Account that will send the E-mails%

>RCPT TO: %E-mail address of the account that will receive the test message%

>Data %Information that will be sent on the test message%

> . %To End and send the message%

29-SMTP-SERVER-TEST-2

E.  Configure SMTP Service to Automatically start

  • Open Services Management Console
  • Search for: Simple mail Transfer Protocol

30-SMTP-Service

  • Open the SMTP Properties
  • Change Startup type to Automatic
  • Click OK

31-SMTP-SERVICE-AUTO

II.  Configure Office 365 Connector

  • Login to Office 365 and Select the Admin icon

1-Office365Console

  • Select Exchange on the Office 365 Admin Center

2-Office365AdminCenter

  • Create Connector

3-Office365ExchangeAdminCenter-Connectors

 

Wait and hour and the test email should arrive at it’s destination and you are ready to Go.

ENJOY 🙂

 

 

Advertisements

Recently a Backup Admin from a client had an issue with DPM  the error read: “DPM encountered error from VMware while trying to get ChangeTracking information. Server – vcenter.mydomain.com ErrorCode – FileFaultFault (ID 33621 Details: Internal error code: 0x80990EF3)”

DPM-_ID_33621

I researched the error and found a solution by:  Josh Gulick, Support Engineer, Microsoft  Change Block Tracking needs to be reset if another backup product has protected a VMWare VM prior to DPM

After implementing consistency check was running, after 5 minutes a error pops-up

“DPM is out of disk space for the replica. (ID 58 Details: There is not enough space on the disk (0x80070070))”

DPM-OutOfDisk

I modified the disk allocation and re-ran the job; Completely Successful.

ConsistencyCheck-OK

Thank you very much: “Josh Gulick” for this contribution.

During a training session with Microsoft Hyper-V  trainees were asked to create and delete checkpoints a particular trainee found herself unable to delete the checkpoint from GUI.

CHKPOINT

As I’ve seen this before many times, I instructed the trainee to open PowerShell and execute the following command: “Get-VMSnapShot -vmname test1”

get-vmshapshot

and there we see the snapshot VMNAME: Test1 – Backup – ( 07/27/2017 – 6:03:10 PM).

Now we must delete the snapshot executing the previous command: “Get-VMSnapShot -vmname test1” and adding “| remove-vmsnapshot”.

Get-VMSnapShot -vmname|remove-vmsnapshot

Once the snapshot is removed Hyper-V will begin to merge the data and reconcile the changes.

snapshotMerge

No snapshots left, and I was able to continue the Hyper-V training.

NoSnapShotsLeft

Good Day to All, I was asked to create Contact Cards in Microsoft Exchange 2010, now this seems like an easy task in the EMC (Exchange Management Console) but when you have 2,000 contacts to create, EMC doesn’t seem much fun after all. Scripting power! I went to Microsoft Website and got some information on how to do it.

Contact-Card.csv

Contact-Card-csv

 

“New-MailContact -ExternalEmailAddress -Name [-Alias ] [-ArbitrationMailbox ] [-Confirm []] [-DisplayName ] [-DomainController ] [-ExternalDirectoryObjectId ] [-FirstName ] [-Initials ] [-LastName ] [-MacAttachmentFormat ] [-MessageBodyFormat ] [-MessageFormat ] [-ModeratedBy ] [-ModerationEnabled <$true | $false>] [-Organization ] [-OrganizationalUnit ] [-OverrideRecipientQuotas ] [-PrimarySmtpAddress ] [-SendModerationNotifications ] [-UsePreferMessageFormat <$true | $false>] [-WhatIf []]”

after a little fine tuning it ended up like this: “Import-CSV Contact-Card.csv | ForEach-Object {New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit $_.OrganizationalUnit -WhatIf}

Let’s break it down:

  1. Import-CSV Contact-Card.csv (where contact-card.csv is the file where we have the information we want to import.
  2. | ForEach-Object {                        (Since we’re doing batch it’s going to execute the command for each record)
  3. New-MailContact                          (Power Shell command to create a mail contact)
  4. -Name $_.Name                            (Exchange Field and Colum name match on csv)
  5. -ExternalEmailAddress $_.ExternalEmailAddress         (Exchange Filed and Column name match on csv)
  6. -OrganizationalUnit $_.OrganizationalUnit               (Exchange Filed and column name match on csv)

-WhatIf

Now the “-WhatIf” at the end of the command will show us a preview of the outcome, once were are ready to execute the command in Production, remove the -WhatIF

After a while, all 2000 contact cards were created…. Next o the Agenda… Script to Forward emails to the created contact cards…

 

 

 

I’ve recently found myself dealing with GPT protected partitions on HP Proliant Servers on which I’ve created Arrays using “Intelligent Provisioning App” to manage Storage. As with any Array configuration:

  1. Add the discs to the enclosure
  2. Create and array
  3. select the discs in the array
  4. Commit changes

and you are done, but recently after running that same procedure when I boot to Windows or VMware I am unable to use the provisioned array. On Windows when I go to the “Disk Manager” it appears as “GPT Protective Partition”

gpt-offline

gpt-online

I tried a couple of things on the GUI but nothing seemed to work, either because the control were grayed or would get errors. I decide to try it “Old school” and use “Diskpart”

gpt-diskpart

  1. Open “Command Prompt” as Administrator
  2. Enter command “Diskpart”
  3. Then command “List Disk”gpt-list-disk
  4. Then command “Select Disk” and the disk number, in this case I will select disk 2gpt-select-disk
  5. Now command “Clean” this command will wipe the partition on the disk.gpt-clean

The disk has been cleared of any “Protectiveness” and is ready to be configured. I executed command “List Disk” to show that the disc is free.gpt-unknown-disc

gpt-unknown-disc2

gpt-unkown-disc3

Now you can configure the disc to you hearts content. I hope this information was useful. Enjoy!

Automatic Upgrade of VMware Tools

Posted: February 28, 2017 in VMWARE

Have you ever tried to upgrade the VMware Tools on a VM and shown:

automaticupgradevmtools

  • Interactive Tools Upgrade
  • Automatic Tools Upgrade

I have stumbled upon this screen many times and most of the time chose the “Interactive Tools Upgrade” option where you login to the VM and install manually. After some research I found the commands on the VMware web page Enjoy!

Ever since System Center 2012 R2 Data Protection Manager started to support VMWare I’ve been trying to get it to work, I would end up getting stuck on the Certificate issue. A couple of days ago I saw this post:

implementingmicrosoftdpmhostlevelprotectionvmwarevms

To my benefit they solved the certificate issue, and I was able to implement the solution perfectly. A very special thanks  J.C. Hornbeck [MSFT] to for this Post.