Aug 26 2015

Event ID 490, ESE – edgetransport (7868) Transport Mail Database: An attempt to open the file “\Queue\trn.chk” for read / write access failed with system error 5 (0x00000005): “Access is denied”

Yes I know. The title for this post is extremely long but thought that it would be easier to find if it’s more descriptive.

In any case. We had to rebuild a multi role server and the Hub Transport role was also installed. After the install we checked that all is good and I found that mail were queued up on the server. Further investigation showed that the Hub Transport service was not started so I tried to start it, which failed.

The event logs showed the below error. I then checked the permissions of the trn.chk file and the queue folder and found that it did not match the permissions on another server. Manually adding the permissions did not work.

The Resolution: I renamed the Queue folder to Queue.old and then started the Hub Transport service. This created a new Queue folder and database and mail were flowing again as expected.

HT Access Denied Error

 

 


Jan 8 2015

Unable to connect a disconnected mailbox – User not found error when trying to connect a mailbox to a user in Exchange

We’ve had a few instances where we need to disconnect a mailbox and reconnect it to a new user account for a user. This should be easy right? Well not always.

It’s happened more than once where we try to use the Exchange Management Console to connect the mailbox to the user account but Exchange can’t find the user account. Have a look in Active Directory and the account shows up. You then try to connect the mailbox to the user account using the Exchange Management Shell with the same results. user not found.

See below on how to get this issue resolved:

1. Open adsiedit.msc (start, run and type adsiedit.msc)
2. Search for the user
3. Open the properties for the user you need to connect the mailbox to
4. Search for the msExchRecipientTypeDetails property
5. For users, change the value from 1 to 0

Wait for replication and then reconnect the mailbox to the user account.

Thanks goes to our colleague Waleed for sharing this with us.

 


Jan 8 2015

E-Mail delivers to Deleted Items folder

We had a shared mailbox where all the mail sent to the mailbox delivered to the deleted items folder. To resolve this do the following:

1. Open Exchange Management Shell
2. Type Get-CalendarProcessing “mailboxname” | fl and press enter
3. If AutomateProcessing shows AutoAccept in the returned results then run the next cmdlet
4. Set-CalendarProcessing “mailboxname” -automateprocessing none
5. Wait for replication and check that Get-CalendarProcessing “mailboxname” | fl shows that it’s set to :none

We verified after running the above that mail delivered to the mailbox deliveres to the Inbox as expected.

 

 


Nov 19 2014

Unable to logon to a reconnected mailbox in Exchange 2010

I tested a few things today and one of them was to disable my mailbox in Exchange 2010. After running Clean-MailboxDatabase databasename I was able to see the disconnected mailbox and reconnect it to my user account.

I then tried to login into my mailbox using Outlook and Outlook WebApp. It looked like it was connecting in Outlook but the mailbox showed disconnected. Outlook Webapp returned with an error that my account is disabled.

To rectify this I just ran Clean-MailboxDatabase databasename again from Exchange Power Shell and was able to logon in Outlook WebApp and Outlook.

Note that running this cmdlet did not show the disabled mailbox immediately so don’t be alarmed, just give it a few minutes to process.

 


Nov 2 2014

Delivery has failed to these recipients or groups: Your message can’t be delivered because delivery to this address is restricted.

You probably have a lot of devices like printers, main frames and other non Microsoft systems sending mail to distribution groups inside your organisation.

If that’s the case and you receive an NDR as per below screenshot then you need to check authentication settings on the distribution group.

Capture

I recently had this problem where mail would not deliver to the recipients and after some testing we were able to generate the above NDR. The Distribution Group was set t only allow mail from authenticated users thus the reason for the mail delivery failure. The main frame is not able or setup to authenticate with Active Directory and could not send mail to that Distribution Group.

Follow the below steps to rectify the problem:

1. Open the Exchange Management Console
2. Click on “Recipient Configuration”
3. Click on “Distribution Group”
4. Find the Distribution Group that is not receiving the e-mail
5. Double click the Distribution Group or Right Click on it and choose Properties
6. Click on the “Mail Flow Settings” Tab
7. Double Click on “Message Delivery Restrictions”
8. Clear the check box next to “Require that all senders are authenticated” as per below screen shot. Now test mail flow from your system that is not able to authenticate.

Capture

 


Sep 7 2014

High Memory Pages/Sec on an Exchange 2010 Server

We had an issue on an Exchange 2010 multi role server this week where the average Memory Pages/Second exceeded 3000. Microsoft recommends that the average Pages/Second should be below 1000.

After some investigation we found that the antivirus software was scanning the Exchange folders and log files. For a quick test we disabled the antivirus agent on the server and the average Pages/Second dropped significantly. There could be countless reasons for above normal Memory Pages/Second issues but checking your antivirus software is a quick check.

The exclusions in the antivirus software was then configured and the issue was permanently resolved. Note that you should never scan your Exchange log files or databases. Check the Microsoft Technet site for exclusions on the Exchange version that you are running.


Jun 19 2014

Export mailbox sizes in Exchange 2010 using Exchange Management Shell

Thought I’d share two scripts today. I use both daily to export mailbox sizes to a csv file for reporting purposes.

These scripts will export the following:

User Display Name, Database where the mailbox is homed ,the mailbox’s  Total Item Size, Item Count in the mailbox and the Storage Limit Status

Export a report on mailbox sizes on a specific server:

Get-Mailbox –Server the server name –ResultSize Unlimited | Get-MailboxStatistics | Select-Object DisplayName, Database, TotalItemSize, ItemCount, StorageLimitStatus | Sort TotalItemSize, -Ascending | Export-CSV driveletter:\foldername\reportname.csv

Export a report for mailboxes homed on all your mailbox servers:

Get-ExchangeServer -Domain your domain name | Get-MailboxStatistics | sort TotalItemSize -Descending | select DisplayName, Database, StorageLimitStatus, @{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}}, @{label=”Deleted Item Size (MB)”;expression={$_.TotalDeletedItemSize.Value.ToMB()}} | epcsv driveletter:\foldername\reportname.csv

Obviously change -Ascending to -Descending so that the output is to your liking.


Apr 29 2014

Export all mailboxes from a Database to pst – Exchange 2010

I have been tasked to export all mailboxes on an Exchange 2010 environment to pst. The reason for this is to provide Mimecast with the mailbox data to ingest into the clients archive that is hosted within Mimecast.

We enable journaling on Exchange but need to ingest all mail that was sent and received before journaling was switched on.

Note that you need to have Exchange 2010 SP1 installed to run the below. The mailbox export request is processed by the CAS server role.
The path to the folder that you export to needs to be an UNC path, pointing to shared local folders won’t work.

  1. Make sure you have enough disk space for all the data that you will be exporting.
  2. Create a folder that you will use to export the pst files to.
  3. Make sure you have read/write permissions on the folder that you created.
  4. Open Exchange Management Shell.
  5. Now you need to give yourself the needed rights to export mailboxes to pst by running the following:  

    New-ManagementRoleAssignment –Role “Mailbox Import Export” –User YourUserName

  6. I had to close the Exchange Management Shell and open it again before I could start an export.
  7. Now run the (copy and paste) below script and replace the text in bold with your environment’s parameters:  

    $mailboxes = Get-Mailbox  -Database “Database Name as displayed in Exchange” -RecipientTypeDetails UserMailbox

    ForEach ($mailbox in $mailboxes) {

      $FilePath = “\\yourservername\driveletter$\pst folder name\” + $mailbox.PrimarySmtpAddress.Local + “@” + $mailbox.PrimarySmtpAddress.Domain + “.pst”

      New-MailboxExportRequest -mailbox $mailbox -FilePath $FilePath -BadItemLimit 10000 -AcceptLargeDataLoss -BatchName “any name you wish” -Name $mailbox.PrimarySmtpAddress.Local}

  8. It might look like the script is not running. Just hit enter. If you see >> then hit enter again. The job will then start and export all mailboxes on the specified database to pst.
  9. If you’d like to check the status of the export then run the below:  

    Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

  10. This will show you the status of each queued MailboxExportRequest.
  11. If you have finished the exports then it’s a good idea to clear the completed requests by running:
    Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest

Tip: If your requests are stuck at 0% then restart the Microsoft Exchange Replication Service.

 I’d like to thank my colleague Sergio for sharing the above script.

 

 


Jul 26 2013

Meeting requests sent to a room mailbox, replaces the Subject, with the Senders name

We received a call today where a meeting request sent to a Room mailbox shows the meeting organiser’s name in the subject line.
This can be rectified by running the following:

Exchange 2010/2013:

Set-CalendarProcessing -identity “meeting room name” -DeleteComments $true -AddOrganizerToSubject $true -DeleteAttachments $true -DeleteSubject $true

Exchange 2007:

set-mailboxcalendarsettings -identity “meeting room name” -deletesubject $false -addorganizertosubject $false

Hope this makes your life a bit easier.


May 30 2013

Exchange 2010 Backups fail with Replica Writer Error

We had a backup fail this week with an error stating something to the lines of Exchange Writer is in a failed state.

After some digging around I found that the Microsoft Exchange Replica Writer was in a failed state. To check the writers do the following:

  1. Open the command prompt on the Exchange server where the backup is failing. (In my case the server with the passive copies)
  2. In the command prompt type: vssadmin list writers and hit enter.
  3. You will now see a list of all the writers with their current state.

The picture below shows the writer in the failed state.

writer

To resolve this issue I had to restart the Exchange Replication Service

I then re-ran vssadmin list writers in the command prompt and it showed its state as stable and the backups went through.