← 返回 Skills 市场
pes0

Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source

作者 pes0 · GitHub ↗ · v1.0.3
cross-platform ⚠ suspicious
1502
总下载
1
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install exchange-2010-ews
功能描述
Full access to Exchange 2010 EWS for managing emails, folders, attachments, calendar events, contacts, tasks, and out-of-office settings.
使用说明 (SKILL.md)

exchange2010

Exchange 2010 EWS integration for emails, calendar, contacts, and tasks.

Setup

Requires credentials in .env.credentials:

EXCHANGE_SERVER=mail.company.com
EXCHANGE_DOMAIN=company
[email protected]
EXCHANGE_PASSWORD=your_password

Features

  • Email: Read unread, send, search, mark as read
  • Email Attachments: Download, extract text (PDF, TXT)
  • Email Folders: Browse Sent, Drafts, Trash, Junk
  • Calendar: View, create, update, delete, search events
  • Recurring Events: Detect and manage series
  • Shared Calendars: Access other Exchange mailboxes
  • Contacts: Search address book, resolve names (GAL)
  • Tasks/To-Do: Manage, create, complete tasks
  • Out-of-Office: Read and set absence messages
  • EWS Filters: Fast search with subject__contains, start__gte, etc.
  • List Calendars: Show all calendar folders

Examples

Read Emails

from skills.exchange2010 import get_account, get_unread_emails

account = get_account()
emails = get_unread_emails(account, limit=10)
for email in emails:
    print(f"{email['subject']} from {email['sender']}")

Today's Events

from skills.exchange2010 import get_today_events

# Your own events
today = get_today_events()

# Events from shared calendar
today = get_today_events('[email protected]')

Search Events

from skills.exchange2010 import search_calendar_by_subject
from datetime import date

# Fast search for Ekadashi
ekadashi = search_calendar_by_subject(
    email_address='[email protected]',
    search_term='Ekadashi',
    start_date=date(2025, 1, 1),
    end_date=date(2026, 12, 31)
)
print(f"Found: {len(ekadashi)} events")

Create Event

from skills.exchange2010 import create_calendar_event
from datetime import datetime

create_calendar_event(
    subject="Team Meeting",
    start=datetime(2026, 2, 7, 14, 0),
    end=datetime(2026, 2, 7, 15, 0),
    body="Project discussion",
    location="Conference Room A"
)

Update Event

from skills.exchange2010 import update_calendar_event
from datetime import datetime

# Reschedule
update_calendar_event(
    event_id='AAQkAG...',
    start=datetime(2026, 2, 10, 14, 0),
    end=datetime(2026, 2, 10, 15, 0),
    location="New Room B"
)

Browse Email Folders

from skills.exchange2010 import get_folder_emails, list_email_folders

# List all folders
folders = list_email_folders(account)
for f in folders:
    print(f"{f['name']}: {f['unread_count']} unread")

# Sent Items
sent = get_folder_emails('sent', limit=10)

# Drafts
drafts = get_folder_emails('drafts')

# Trash
trash = get_folder_emails('trash')

Search Emails

from skills.exchange2010 import search_emails

# By sender
emails = search_emails(sender='[email protected]', limit=10)

# By subject
emails = search_emails(subject='Invoice', folder='inbox')

# Unread only
emails = search_emails(is_unread=True, limit=20)

Mark Email as Read

from skills.exchange2010 import mark_email_as_read

mark_email_as_read(email_id='AAQkAG...')

Download Attachments

from skills.exchange2010 import get_email_attachments

# Show info
attachments = get_email_attachments(email_id='AAQkAG...')
for att in attachments:
    print(f"{att['name']}: {att['size']} bytes")

# Download
attachments = get_email_attachments(
    email_id='AAQkAG...',
    download_path='/tmp/email_attachments'
)

Extract Text from Attachments

Prerequisite: pip install PyPDF2 for PDF text extraction

from skills.exchange2010 import process_attachment_content

results = process_attachment_content(email_id='AAQkAG...')
for result in results:
    print(f"File: {result['name']}")
    if 'extracted_text' in result:
        print(f"Content: {result['extracted_text'][:500]}...")

Search Contacts

from skills.exchange2010 import search_contacts, resolve_name

# Search contacts
contacts = search_contacts('John Doe')
for c in contacts:
    print(f"{c['name']}: {c['email']}")

# Resolve name (GAL)
result = resolve_name('[email protected]')
if result:
    print(f"Found: {result['name']} - {result['email']}")

Manage Tasks

from skills.exchange2010 import get_tasks, create_task, complete_task, delete_task
from datetime import datetime, timedelta

# Show open tasks
tasks = get_tasks()
for task in tasks:
    status = '✅' if task['is_complete'] else '⏳'
    print(f"{status} {task['subject']}")

# Create new task
task_id = create_task(
    subject="Finish report",
    body="Q1 report due Friday",
    due_date=datetime.now() + timedelta(days=3),
    importance="High"
)

# Mark as complete
complete_task(task_id)

# Delete
delete_task(task_id)

Find Recurring Events

from skills.exchange2010 import get_recurring_events

recurring = get_recurring_events(
    email_address='[email protected]',
    days=30
)
for r in recurring:
    print(f"{r['subject']}: {r['recurrence']}")

Out-of-Office

from skills.exchange2010 import get_out_of_office, set_out_of_office
from datetime import datetime, timedelta

# Check status
oof = get_out_of_office()
print(f"Out of office active: {oof['enabled']}")

# Enable
set_out_of_office(
    enabled=True,
    internal_reply="I am on vacation until Feb 15th.",
    external_reply="I am on vacation until Feb 15th.",
    start=datetime.now(),
    end=datetime.now() + timedelta(days=7),
    external_audience='All'  # 'All', 'Known', 'None'
)

# Disable
set_out_of_office(enabled=False, internal_reply="")

Send Email

from skills.exchange2010 import send_email

send_email(
    to=["[email protected]"],
    subject="Test",
    body="Hello!",
    cc=["[email protected]"]
)

API Reference

Email

Function Description
get_account() Connect to Exchange
get_unread_emails(account, limit=50) Get unread emails
search_emails(search_term, sender, subject, is_unread, folder, limit) Search emails
send_email(to, subject, body, cc, bcc) Send email
mark_email_as_read(email_id) Mark as read
get_email_attachments(email_id, download_path) Download attachments
process_attachment_content(email_id, attachment_name) Extract text

Email Folders

Function Description
get_folder_emails(folder_name, limit, is_unread) Emails from folder
list_email_folders(account) List all folders

Calendar

Function Description
get_today_events(email_address) Today's events
get_upcoming_events(email_address, days) Next N days
get_calendar_events(account, start, end) Events in range
get_shared_calendar_events(email, start, end) Shared calendar
search_calendar_by_subject(email, term, start, end) Fast search
create_calendar_event(subject, start, end, body, location) Create event
update_calendar_event(event_id, ...) Update event
get_event_details(event_id) Show details
delete_calendar_event(event_id) Delete event
get_recurring_events(email, start, end) Recurring events
list_available_calendars(account) List calendars
count_ekadashi_events(email, start_year) Count Ekadashi

Contacts

Function Description
search_contacts(search_term, limit) Search contacts
resolve_name(name) Resolve name (GAL)

Tasks

Function Description
get_tasks(status, folder) Get tasks
create_task(subject, body, due_date, importance, categories) Create task
complete_task(task_id) Mark complete
delete_task(task_id) Delete task

Out-of-Office

Function Description
get_out_of_office(email_address) Read status
set_out_of_office(enabled, internal_reply, ...) Set OOF

Notes

  • Exchange 2010 SP2 explicitly used as version
  • DELEGATE access type for own and shared mailboxes
  • EWS Filters (subject__contains, start__gte) are faster than iteration
  • Timezones: Automatic conversion to EWSDateTime with UTC
  • 27 functions available in total
安全使用建议
Things to check before installing or supplying credentials: - Do not place high-privilege or personal credentials in a repository/root-level .env.credentials file. The code reads .env.credentials two directories above the package and will set those values into the process environment. - Confirm which environment variable names the skill actually uses. The SKILL.md documents EXCHANGE_* names, but the code reads PICARD_USERNAME / PICARD_PASSWORD (and then raises an error mentioning EXCHANGE_PASSWORD). This mismatch is a bug and could cause you to store credentials in the wrong place. - Limit the account you provide to the minimum necessary scope (a test/service mailbox where possible) because the skill can read mail, download attachments, send email, change out-of-office settings, and modify calendar events. - Review the code locally before running: the _load_env() logic blindly sets os.environ from the file; consider changing it to read only expected keys (or to accept credentials passed in explicitly) and avoid overwriting unrelated environment variables. - Ensure required runtime dependency exchangelib (and optionally PyPDF2) are installed in an isolated environment before use. If you cannot or will not audit the code, treat this skill as suspicious and avoid placing real, high-privilege credentials in the expected .env.credentials location. If you proceed, create a dedicated, limited-permission service account and test in an isolated environment first.
功能分析
Type: OpenClaw Skill Name: exchange-2010-ews Version: 1.0.3 The OpenClaw skill 'exchange-2010-ews' is designed for legitimate integration with Microsoft Exchange 2010 EWS, enabling email, calendar, contact, and task management. The `SKILL.md` clearly outlines its purpose and required credentials, without any prompt injection attempts. The `__init__.py` code uses the `exchangelib` library to perform these actions, loading credentials from a `.env.credentials` file as expected. While the skill handles sensitive data like emails and attachments, and performs high-privilege actions such as sending emails or modifying calendar entries, these capabilities are explicitly stated and are core to its functionality. There is no evidence of unauthorized data exfiltration, malicious execution, persistence, or obfuscation.
能力评估
Purpose & Capability
Functionality implemented (read/send email, calendar, contacts, tasks, OOF, shared calendars, attachments) matches the SKILL.md features and the skill name — the capability set is coherent with an Exchange/EWS integration.
Instruction Scope
SKILL.md instructs storing EXCHANGE_* credentials in a .env.credentials file, but the code _load_env() will read a .env.credentials file two directories above the package and blindly set those keys into os.environ. The code also expects different env var names (PICARD_USERNAME, PICARD_PASSWORD) while error messages reference EXCHANGE_PASSWORD — this mismatch is confusing and could cause accidental credential placement in an unexpected location. Reading a repo/root-level .env file and mutating os.environ expands the skill's scope beyond the package and risks exposing unrelated credentials.
Install Mechanism
No install spec is present (instruction-only with a code file). That reduces supply-chain risk since nothing is downloaded at install time. However the code depends on exchangelib and optional PyPDF2 (not declared), so runtime failures may occur if dependencies are missing.
Credentials
The SKILL.md declares EXCHANGE_SERVER, EXCHANGE_DOMAIN, EXCHANGE_EMAIL, EXCHANGE_PASSWORD; the code reads those in _load_env() but then uses PICARD_USERNAME and PICARD_PASSWORD as the actual variables for authentication (and raises an error referencing EXCHANGE_PASSWORD). The skill requests credentials appropriate for Exchange access (expected), but the mismatched variable names and implicit file location are disproportionate and error-prone. The skill also sets environment variables globally from a file two dirs up, which could overwrite unrelated environment settings.
Persistence & Privilege
The skill is not always-enabled and does not request persistent platform privileges. It can perform mailbox actions (send email, set OOF, modify events) — those are appropriate for an Exchange integration but mean you should grant it only an account with the minimal required permissions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install exchange-2010-ews
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /exchange-2010-ews 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
Version 1.0.3 - No code or documentation changes detected. - Content and features are unchanged from the previous version.
v1.0.2
- Updated setup instructions: standardized environment variable names (`EXCHANGE_SERVER`, `EXCHANGE_DOMAIN`, `EXCHANGE_EMAIL`, `EXCHANGE_PASSWORD`) for configuration. - Example code and documentation updated to use more generic company placeholder addresses (e.g., `[email protected]`, `[email protected]`). - Calendar event search and shared calendar usage examples updated for clearer demonstration and more typical date ranges. - Improved instructional clarity and consistency throughout SKILL.md documentation.
v1.0.1
exchange-2010-ews 1.0.1 - Updated documentation to use generic placeholder values for credentials in setup instructions. - No changes to code or functionality.
v1.0.0
Initial release: Comprehensive Exchange 2010 integration via EWS. - Send, read, search, and manage emails (including attachments and folders). - Full calendar support: view, create, update, delete, search events (including recurring and shared calendars). - Manage contacts with address book search and GAL name resolution. - Create, view, complete, and delete tasks. - Read and set out-of-office (automatic replies). - Fast server-side filtering and advanced folder browsing. - Detailed usage examples and API reference included in documentation.
元数据
Slug exchange-2010-ews
版本 1.0.3
许可证
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source 是什么?

Full access to Exchange 2010 EWS for managing emails, folders, attachments, calendar events, contacts, tasks, and out-of-office settings. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1502 次。

如何安装 Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install exchange-2010-ews」即可一键安装,无需额外配置。

Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source 是免费的吗?

是的,Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source 完全免费(开源免费),可自由下载、安装和使用。

Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source 支持哪些平台?

Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Full access to all Exchange 2010 EWS functions, should work with other EWS Open Source?

由 pes0(@pes0)开发并维护,当前版本 v1.0.3。

💬 留言讨论