以编程方式向 Exchange 03/07 邮箱添加别名的最简单方法?

发布于 2024-07-17 00:39:20 字数 631 浏览 3 评论 0原文

目前,我们有一个特定的格式来根据姓名定义我们的电子邮件地址。 这个系统起源于一段时间以前,并且开始成为一个障碍。

我们希望转向一种新的格式,基于然而

<first name initial><second name initial><last name>@organisation.com

,我们不仅仅想重命名邮箱等,相反,我们选择保留所有当前用户的现有电子邮件地址,但使用新的表单来存储新的电子邮件地址。用户。 此外,我们希望使用旧格式向所有邮箱添加邮件别名。

任何人都可以建议一种相对直接的方法来通过代码添加这些别名吗? 提取用户名详细信息不是问题,而且只需将别名添加到邮箱即可。 我们目前为大多数用户运行 Exchange 2003,但即将进行 2007 迁移,因此也有少数用户在 2007 上运行(两台服务器目前并行运行)。

我读到所有的 Exchange 2007 管理都应该使用 2007 工具来完成,而不是像以前那样使用活动目录,因此所有这些都可以通过 Exchange 2007 API 执行,甚至对于 2003 年的“旧邮箱”(如交换)?

基本上我只是在寻找一个好的方向去这里; 我从来没有真正为交换做过任何编码。 谢谢!

We currently have a specific format for how our email addresses are defined, based upon name. This system originated some time ago and is beginning to become a bit of a hindrance.

We would like to move to a new format, based along the line of

<first name initial><second name initial><last name>@organisation.com

However, we dont just want to rename the mailboxes etc, instead we're opting to keep the existing email addresses for all current users, but using the new form for new users. In addition, we want to add a mail alias to all of the mailboxes using the legacy format.

Can anyone suggest a relatively straight-forward way to add these aliases via code? Pulling the user's name details is not an issue, moreso just adding the alias to the mailbox. We're currently running exchange 2003 for most users, but are on the verge of a 2007 migration, and so have the odd user on 2007 also (the two servers are running side by side at present).

I've read that all exchange 2007 management should be done using the 2007 tools and not active directory as was previously the case, so can all of this be performed via the exchange 2007 APIs, even for 2003 "legacy mailboxes" (as termed in exchange)?

Basically I'm just looking for a good direction to go here; I've never really done any coding for exchange. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

紫﹏色ふ单纯 2024-07-24 00:39:20

这是一个 MS 知识库,描述了通过扩展 MAPI 修改别名。 您似乎需要 Exchange 开发人员工具包才能执行此操作。

http://support.microsoft.com/kb/183249

Here's a MS KB that describes modifying the alias through extended MAPI. It looks like you'll need the Exchange Developers Kit to do this.

http://support.microsoft.com/kb/183249

微暖i 2024-07-24 00:39:20

我在问题得到解答后发布此内容,但是您有什么理由不只使用收件人策略吗?

I'm posting this after the question was answered, but is there any reason you didn't just use the recipient policies?

风向决定发型 2024-07-24 00:39:20

最后我发现 Powershell 是迄今为止最简单的方法。 下面是我最终使用的脚本框架,展示了如何向每个邮箱添加附加地址:

$mailboxes = get-mailbox | sort Name

foreach($mailbox in $mailboxes)
{
    ...
    # Logic for working out the new address
    ...

    $mailbox.EmailAddresses += $newAddress
    $mailbox | set-mailbox
}

为了完整起见,该脚本在新的 Exchange 2007 服务器上运行。 我最初担心将地址添加到 2003 年旧服务器上的邮箱中,但这并不是问题; 旧邮箱也已更新。

In the end I found Powershell was by far the easieast way to go. Here is a skeleton of the script I ended up using showing how to add an additional address to each mailbox:

$mailboxes = get-mailbox | sort Name

foreach($mailbox in $mailboxes)
{
    ...
    # Logic for working out the new address
    ...

    $mailbox.EmailAddresses += $newAddress
    $mailbox | set-mailbox
}

And for completeness, this script was run on the new Exchange 2007 server. My initial concern with adding the addresses to mailboxes residing on the older 2003 server was a non-issue; the legacy mailboxes were updated too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文