SMTP Relay in Office365

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.

Get SMTP adresses with CSVDE (commandline) in Exchange 2003

This one gives you username and primary Email address

csvde -f users.csv -r “(&(objectCategory=Person)(objectClass=user))” -l “sAMaccountname,mail”


This one gives you ALL email addresses connected to the user

csvde -f users.csv -d OU=SBSUsers,OU=Users,OU=MyBusiness,DC=Company,DC=no -r (mailnickname=*) -l “sAMaccountname,mail,proxyaddresses”

Find SMTP-adress in Active Directory

1. Run Active Directory Users and Computers.

2. Right-click the domain object and choose Find from the context menu. This will bring up the Find Users,

Contacts, and Groups window.

3. In the Find drop-down list, choose Custom Search.

4. Click the Advanced tab and in the Enter LDAP query: field, enter the following text: proxyaddresses=smtp:emailaddress@”yourdomain.com”

5. Click the Find Now button.