Disable-Mailbox does not remove 'mail' attribute??
Hi,
I use Disable-Mailbox to remove all exchange attributes from the mailbox
without deleting the user account in AD. This nearly works, BUT it does not
remove the "mail" attribute? Has anyone else noticed this on Exch 2007? This
seems wrong to me...
September 1st, 2010 6:08pm
The "mail" attribute is not an Exchange attribute, it's part of the schema definition for an AD user object, and exists for each user in the directory before Exchange is ever installed in the domain.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2010 6:23pm
mjolinor wrote:
> The "mail" attribute is not an Exchange attribute, it's part of the schema
> definition for an AD user object, and exists for each user in the directory
> before Exchange is ever installed in the domain.
Thanks.
In this article
http://msexchangeteam.com/archive/2006/10/13/429192.aspx
it shows the 'mail' attribute as being in the "remove" list for Exch
2003, Exchange doesn't only affect "exchange attributes".
If a new user is created in AD without a mailbox, the 'mail' attribute
will not be set. Creating an Exch 2007 mailbox will set the 'mail'
attribute, so it should un-set it when the mailbox is disabled?
If you're saying the 'mail' attribute is nothing to do with Exchange
then it should not set it in the first place?
You could probably say that proxyAddresses is also not an exchange
attribute, but it still gets set and un-set by Exch 2007?
September 1st, 2010 9:14pm
You'll need to get someone from MS to get you a definitive answer, but I can easily imagine scenarios where removing an Exchange mailbox doesn't necessarily mean that the associated email address is no longer valid for that user.
In a situation where you're using an internal relay domain, a user's mailbox can move from an external mail system to Exchange, or from Exchange to an external mail system, and their email address not change. The assumption that if the user's mailbox
is removed from Exchange, then they no longer receive email or use that email address is not necessarily valid.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2010 2:02am
Exchange sets the mail attribute but it really isn't used for anything. It is generally set to the primary SMTP address. However, the proxyAddresses attribute is what is used for mail delivery, and the capitalized proxy address is what is used
as the reply address when mail is sent.Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
September 2nd, 2010 7:18pm
That may be the case, and the appropriate course of action is to mailbox-disable the user, then mail-enable the user. That requires remembering all the e-mail addresses, though, so you can put them back. It's too bad that there's no operation
to do that for automatically, although it certainly could be scripted if it were something that were done often or in bulk.Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2010 7:20pm
Hi Gerry,
Per my known, it is by design, the mail attribute and the proxyaddress attribute could be different, that is when you enable exchange feature for an account without mail attribute configured, both of them would be same, but if the mail attribure has been
configured, they would be different.
As above information by Mjolinor and Ed, the mail attribute is attribute before you do the exchange prepare. It would not be operated when you disable the exchange feature.
Regards!
Gavin
September 6th, 2010 11:50am
"Gavin-Zhang" wrote in message
news:b094c844-8af1-4ff5-95b6-5ec08dfa5f42@communitybridge.codeplex.com...
> Per my known, it is by design, the mail attribute and the proxyaddress
> attribute could be different, that is when you enable exchange feature for
> an account without mail attribute configured, both of them would be same,
> but if the mail attribure has been configured, they would be different.
> As above information by Mjolinor and Ed, the mail attribute is attribute
> before you do the exchange prepare. It would not be operated when you
> disable the exchange feature.
Yes, but in all cases I've tested, the 'mail' attribute was un-set before I
enabled the mailbox, Exchange _changed_ the attribute (as expected), but did
NOT remove the attribute when the mailbox was later disabled - this is
wrong. If the account had been set as a contact, or set up for an external
address, then it would make sense.
In Exch 2003 it works correctly.
In Exch 2007 SP2 it does not work correctly.
In our config, we have to test for duplicate alias, and we also synch
mailboxes across two forests, so it's important we can correctly "clean" all
Exchange attributes. I'll have to script an additional step to remove the
'mail' attribute.
Thanks for all the comments.
Anyone tested this on Exch 2007 SP3 or Exch 2010?
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2010 3:48pm
Hi Gerry,
I have made a test on exchange 2010 scenario, the same as exchange 2007.
I have also made a test in exchange 2003 scenaril, sure you are right, if you remove the exchange attribute in the exchange task, the mail attribute is removed too.
I also confirm that the behavior is by design, you could manually remove it or use script to remove it.
Regards!
Gavin
September 7th, 2010 6:02am
"Gavin-Zhang" wrote in message
news:91f4332d-bf84-442c-b56d-5a6b82b2ef12@communitybridge.codeplex.com...
> I have made a test on exchange 2010 scenario, the same as exchange 2007.
OK, thanks for testing.
> I have also made a test in exchange 2003 scenaril, sure you are right, if
> you remove the exchange attribute in the exchange task, the mail attribute
> is removed too.
OK, thanks for checking.
> I also confirm that the behavior is by design, you could manually remove
> it or use script to remove it.
I'm not sure what you mean here? Do you mean Microsoft deliberately changed
the behavior in Exch 2007/2010 such that this attribute is no longer removed
when a mailbox is disabled? That doesn't make sense to me..
Thanks for the help!
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2010 2:11pm
Hi Gerry,
Sure, I also confirmed it from our other team, it is by design.
Regards!
Gavin
September 9th, 2010 5:14am