从python创建交换邮箱 [英] Create exchange Mailbox from python

查看:170
本文介绍了从python创建交换邮箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Exchange 2003服务器上使用python创建一个邮箱。
特技条件是我们的机器安装了office 2007和office 2010,因此系统上没有安装cdoexm.dll。也因为它是2007/10你不能安装ExchangeCdo,因为它需要某些版本的展望。此外,在服务器上未启用mapi。

I need to create a mailbox on an exchange 2003 server using python. The stunt conditions are that our machines have either office 2007 and office 2010 installed and thus the cdoexm.dll is not installed on the system. Also as it is 2007/10 you cant install the ExchangeCdo as it requires certain versions of outlook. Also mapi is not enabled on the server.

这是一种情况,我必须调用外部程序来执行此操作吗?我已经花了最后几天拖网站,但所有的解决方案似乎使用cdoexm。

Is this a case where I will have to call an external program to do this? I've spent the last couple of days trawling sites but all the solutions seem to use cdoexm.

希望有人有一些想法!

推荐答案

确定,所以它不是一个python问题,但最终需要CDOEXM。
首先你需要去控制面板 - >添加/删除程序 - >添加/删除Windows组件。选择Internet信息服务(IIS)并单击详细信息,勾选Internet信息服务管理单元,然后单击确定,然后下一步并安装(您需要使用xp sp3 cd)。

OK so it wasn't a python problem in the end but did require CDOEXM. First you need to go to control panel->add/remove programs->add/remove windows components. Select Internet Information Services (IIS) and click details, tick Internet Information Services Snap-In and click OK, then next and install (you will need the xp sp3 cd for this).

完成后,您将需要Exchange服务器(在我的情况下为2003)安装cd,并且您只想安装管理组件。当这最后完成后,您将有CDOEXM DLL,然后您可以在您的项目中使用。

After this is done you will need the exchange server (in my case 2003) install cd and you want to install management components only. When this is finally done you will have the CDOEXM dll which you can then use in your projects.

使用 Tim Golden的真棒活动目录模块 for Python。

Heres an example using Tim Golden's awesome active directory module for Python.

import active_directory

homeMDB = "CN=UBER MAILBOX,CN=InformationStore,CN=UBERMAILSERVER,"\
        "CN=Servers,CN=Administrative Groups,CN=UBERORG,"\
        "CN=Microsoft Exchange,CN=Services,CN=Configuration,"\
        "DC=uber,DC=org,DC=uk"

user=active_directory.find_user("captain.awesomeface")
user.CreateMailbox(homeMDB)


user.Properties["mail"].Value = "captain.awesomeface@uberorg.com";

user.SetInfo()

这篇关于从python创建交换邮箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆