Archive

Posts Tagged ‘Office 365’

SMTP Relay in Office365

December 23, 2015 Leave a comment

When sending email from i.e. Visma or other 3. party applications you need a SMTP server. Some times you can use the local ISP SMTP server, but then you need to add that SMTP server to yours domain SPF record. You might don`t wnat to do this.

 

Here is the solution:

Log in to the tennant, and start Exchange management console.

Create a connector filtering on the public IP address beeing used for the server that hosts Visma.

In Visma add a SMTP server using your MX record for that tennant (i.e. itstyring-no.mail.protection.outlook.com​ ) and port 25.

 

This connector will relay email with from addresses containing a valid domain for that tennant.

OneDrive for Business – ​The server you are trying to access is using an authentication protocol not supported by this version of Office.

December 18, 2015 Leave a comment

OneDrive for Business – ​The server you are trying to access is using an authentication protocol not supported by this version of Office.

We ran into this error and found the following fix at community.office365.com

1.Accessed Control Panel > Selected the Microsoft Office Subscription > right clicked > change > Selected Online Repair
2.Removed all the stored credentials in the credentials manager (control panel > credentials manager)
3. Restarted the computer
4. Deleted the folder’s below:
C:\Users\username\AppData\Local\Microsoft\Office\Spw
C:\Users\username\AppData\Local\Microsoft\Office\16.0\OfficeFileCache
5. Sign in Word (opened blank document > file > account > signed out and signed in office 365 account)
6. Started OneDrive for Business. ( from the search bar typed OneDrive for Business> clicked on the app > sync a different library instead >pasted the url of the team site “Public documents” > sync now​

Source:
https://community.office365.com/en-us/f/154/t/410059

Get a list of Office365 users with License attached, Primary SMTP address and Aliases


To get an list of all users that has an Office365 license assigned and with Displayname, Primary SMTP address and all other adresses registrated on the users use this one-liner in PowerShell! 🙂

get-mailbox | Where-Object {$_.SKUAssigned -eq “TRUE”} | Select-Object Displayname, PrimarySMTPAddress, EmailAddresses | Export-Csv c:\temp\noah2.csv -Encoding UTF8

Allow external senders in Public folder – Office365


Public folders are set to NOT allow external senders to public folders in Office 365. This can be fixed using the following receipt:

Conncect to the Windows Azure Active Directory Module for Windows PowerShell using the following commands.
Create a placeholder for your credentials:
$LiveCred = Get-Credential

Popup box will ask for your Office 365 Global Administrator credentials.

Create a placeholder for your Powershell Session towards Exchange Online.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

Import your Powershell Session to connect to Exchange Online.
Import-PSSession $Session

Run this command to allow all scripts:
set-executionpolicy unrestricted

Then the public folder part
Add-PublicFolderClientPermission \(Path of the Public folder name) -User Anonymous -AccessRights CreateItems

Change Default emailadress on Public folder in Office365


The problem:
A public folder in Office 365 Hosted Exchange will be assigned a @onmicrosoft.com address by default. And there is of cource no way of changing this to your primary domain.

Solution:
Conncect to the Windows Azure Active Directory Module for Windows PowerShell using the following commands.
Create a placeholder for your credentials:
$LiveCred = Get-Credential

Popup box will ask for your Office 365 Global Administrator credentials.

Create a placeholder for your Powershell Session towards Exchange Online.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

Import your Powershell Session to connect to Exchange Online.
Import-PSSession $Session

Run this command to allow all scripts:
set-executionpolicy unrestricted

Then run the following command to disable the Policy for assigning email Adresses in public folders.
Set-MailPublicFolder -Identity “\” -EmailAddressPolicyEnabled $False

Now, in your Office 365 tennant web admin go to Exchange – Public Folders – Highlight the public folder (email enabled) – Click the pencil (edit) – Click on Email Address – highlight the address you want to use as default – Click pencil – Check the default email address checkbox.
Save, close and test.

SPF 1-2-3

February 16, 2015 Leave a comment

Here is a quick intro to SPF and how to configure it:

SPF (Sender Policy Framework) is a countermeassure for beeing an unwilling wictim of spam sending. Using SPF you can approve from what SMTP servers email from @yourdomain.com will be sent from. This will make it harder to spoof your e-mail adrress, as long as the receipient server checks the SPF record.

For Office365 you need to update your DNS zone with SPF records to fully validate the domain. Here is an example of how the SPF record shuld look like:

v=spf1 include:spf.protection.outlook.com -all

If you are using some system to send out e-mails outside Office365 you need to add those servers to you SPF record.
If you just want to add a IP adresse this is how your record shuld look like:
v=spf1 include:spf.protection.outlook.com ip4:11.11.11.18 -all

And if you want to use a hostname (and a IP address) it could be like this:
v=spf1 include:spf.protection.outlook.com ip4:11.11.11.18 a:mail.sender.com -all

Note that using include will require the domain (ie_ spf.protection.outlook.com) to have its own SPF record to be valid.

Change primary email address in Office 365


Start powershell as administrator

Run the following commands:
$LiveCred = Get-Credential
(Enter your Office 365 administrator credentials)
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

Find all aliases for one account:
get-mailbox | select -expand emailaddresses alias
Alternativt:
get-mailbox name@domain.com | select -expand emailaddresses alias

Add email alias to an Account:
Set-Mailbox name@domain.com -EmailAddresses SMTP:newprimaryaddress@domain.com,anotheraddress@domain.com,yet.another.address@domain.com

NOTE: the first address after “SMTP:” will be the primary e-mail address. All aliases will be replaced. If you have 100 aliases and only type in one in this command, you will lose 99 aliases!

%d bloggers like this: