Solved

SMTP Relay with Exchange, how to capture emails

Posted on 2014-09-05
7
90 Views
Last Modified: 2016-06-13
Hi,

I have a website that is relaying emails through Exchange 2013 (Office 365) account, sending emails by authenticating through one of the accounts.

How do I capture these emails and put them in some inbox or folder. Preferably a sent folder.

Or is there a better way of doing it through another provider like sendgrid.com or gunmail?

Thanks
0
Comment
Question by:RFVDB
  • 3
  • 3
7 Comments
 
LVL 12

Accepted Solution

by:
David Paris Vicente earned 500 total points
ID: 40307043
Hi RFVDB,

I believe that the best way is to enable Journaling for that mailbox but for that you will need to have an Enterprise Account for office 365.
If you are using an enterprise account you can follow this link

If you are using a SBS Account the journaling feature is not available, so the workaround could be:
1. Create a new mailbox to collect all the messages. For example, MBXForward@domain.com.
 
 2. Connect Windows PowerShell to the Exchange Online service: http://help.outlook.com/en-us/beta/cc952755.aspx?sl=1.

3. Run this command in Remote PowerShell:
  Get-Mailbox | Where {$_.RecipientType -eq "UserMailbox"}| Set-Mailbox -DeliverToMailboxAndForward $true
 
 4. Run another command to set forwarding rules for all the user mailboxes:
 Get-Mailbox | Where {$_.RecipientType -eq "UserMailbox"}| Set-Mailbox -ForwardingAddress MBXForward@domain.com
 
 5. Remove the forwarding rule for the public forward mailbox:
 Set-Mailbox pulicforward -ForwardingAddress $null
 
 After that, all the user messages will be forwarded to the mailbox MBXForward@domain.com

I hope this was your question.

Let us know if helped.
0
 

Author Comment

by:RFVDB
ID: 40307074
Hi,

Thanks for the quick detailed response. They are using the Exchange Online Plan1. Which is the first tier Exchange. However with Journaling, when I setup a Journal rule, I specify the Exchange Account I am Authenticating through "joe@domain.com" for "If the message is sent to or received from ..."

Then select * Journal the following messages..." I select "All Messages" and it gives me the following error.

"the JournalEmailAddress can only be a mail user, a mail contact or an external address."

This error comes up no matter whether I select External, Internal or All messages.

What's happening is the websites will use SMTP relay through smtp.office365.com port 587, authenticating through a valid Office 365 account. It will be from user@internaldomain.com to user@externaldomain.com, the external addresses will be random, depending on who fills out a form on the website.

If I'm supposed to use a valid account to authenticate through, how could I use a "mail user, a mail contact or an external address".

Tried using Mail Flow Transport Rules but it didn't seem to work.

Looking at your other method for SBS, I'm not as familiar as you are with Exchange PowerShell so I'm not exactly sure what all of those commands are doing to know that it will implement what I'm trying to do - want to make sure we're on the same page.

Thanks again.
0
 
LVL 12

Expert Comment

by:David Paris Vicente
ID: 40309535
Hi.

You can´t because you are not using an Enterprise Account, only this account can do some settings, like Journaling, Transport Rules etc...
As I mention before the Only to Accounts who can do some configurations are SBS and Enterprise.

Because you are not using an mail account from your exchange you cannot use Journaling, you are only relaying messages through Exchange Organization the only way is to create transport rules or Journaling SMTP connector, but because you don´t have an Account for that, as a possible solution, is to tell your App in the Web Server for every mail relayed to exchange also insert in BCC a exchange mailbox Account.

Or third party tools.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:RFVDB
ID: 40369661
Hi,

Thanks for the reply. Exchange Online Plan1 is the first tier of the Enterprise Plans, so it is an enterprise plan.

I ran into the Journaling issue/error above that I didn't know how to resolve - do you have an answer to that one by chance?

I was able to create transport rules no problem.
0
 
LVL 12

Expert Comment

by:David Paris Vicente
ID: 40370829
Can you show us the error?

The transport rule is Working?
0
 

Author Comment

by:RFVDB
ID: 40460093
Sorry. I'm no longer trying to solve this issue.

The transport rule did the trick for me.
0

Featured Post

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now