0

Is it possible to add a condition to dynamic distribution group in Exchange 2007 that will filter for enabled accounts only?

When a staff member leaves we have to keep their account in the system for a certain amount of time because of data protection or something, but eventually the mailboxes get full and start rejecting mail, which is annoying for the senders.

toryan
  • 231
  • 3
  • 6
  • 17

1 Answers1

1

When you disable the user account, be sure to disable the corresponding mailbox as well.

You can then filter on the IsMailboxEnabled property in your distribution groups:

New-DynamicDistributionGroup -Name AllUsersGroup -OrganizationalUnit domain.tld/Users -RecipientFilter {((RecipientType -eq 'UserMailbox') -and -not(IsMailboxEnabled -eq $false))}
Mathias R. Jessen
  • 25,161
  • 4
  • 63
  • 95
  • That's handy but is it possible to do it based on whether the AD account is enabled/disabled? – toryan Sep 24 '13 at 13:41
  • 1
    @toryan Not according to the [filterable properties documentation for Exchange 2007](http://technet.microsoft.com/en-us/library/bb430771(v=exchg.80).aspx) – Mathias R. Jessen Sep 24 '13 at 13:51