lifeprisma/roundcube-genia 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lifeprisma/roundcube-genia

Composer 安装命令:

composer require lifeprisma/roundcube-genia

包简介

GenIA — AI-powered email assistant for Roundcube. Multi-provider (OpenAI, Grok), streaming, inline translate, scam detection, smart reply, summarize, and more.

README 文档

README

GenIA — AI Email Assistant for Roundcube

GenIA — AI Email Assistant for Roundcube

The missing AI for your self-hosted email.
Compose, rewrite, reply, translate, summarize, scam check — works with OpenAI, Claude, Grok, Ollama, or any local LLM.

FeaturesInstallationConfigurationUsageFAQContributing

Release License Roundcube PHP

Why?

Gmail has Gemini. Outlook has Copilot. Your self-hosted Roundcube has... nothing. Until now.

GenIA brings the same AI-powered email experience to your own mail server. No vendor lock-in. Point it at a local Ollama instance and zero data leaves your network. Or use cloud providers like OpenAI and Grok when convenience matters. Your server, your choice.

Features

Seven Powerful Actions

Action What it does
Compose Describe what you want, get a fully written email
Rewrite Change tone, rephrase, restructure your existing draft
Reply AI reads the conversation and drafts a contextual reply
Translate Translate between 6 languages preserving tone and structure
Summarize Extract key points and action items from long threads
Fix Grammar Correct spelling, grammar, and punctuation with minimal changes
Check Scam Analyze emails for phishing, fraud, and social engineering

Quick Actions Toolbar (Read View)

When reading an email, a toolbar appears above the message body with one-click actions:

  • Translate — dropdown with 7 languages, streams translation inline, "Show Original" to revert
  • Summarize — streams a summary in a result panel above the email
  • Scam Check — analyzes the email with color-coded verdict (green/yellow/red)
  • Reply with AI — opens the full GenIA panel in reply mode

Multi-Provider Support

Switch between AI providers directly in the UI. Mix cloud and local:

Provider Models Data leaves network? API Key
Ollama Llama 3.1, Mistral, Qwen, Gemma, etc. No — fully local Not needed
LM Studio Any GGUF model No — fully local Not needed
LocalAI / vLLM Any supported model No — fully local Optional
OpenAI GPT-5.4, GPT-4.1, GPT-4o Yes — sent to OpenAI platform.openai.com/api-keys
Anthropic (Claude) Sonnet 4.6, Haiku 4.5, Opus 4.6 Yes — sent to Anthropic console.anthropic.com
xAI (Grok) Grok-4.1-fast, Grok-3 Yes — sent to xAI console.x.ai
Any OpenAI-compatible API Custom Depends on endpoint Varies

AI Controls

  • Reasoning Effort — None / Low / Medium / High
  • Verbosity — Concise / Balanced / Detailed
  • Language — Portuguese, English, Spanish, French, German, Italian, Dutch
  • Tone — Professional, Casual, Friendly, Formal, Urgent

Smart Features

  • Streaming responses — see the AI write in real-time
  • Conversation memory — chain instructions: "make it shorter", "now translate it"
  • Preview before applying — review AI output before it touches your email
  • Undo — one-click revert after applying
  • Copy to clipboard — copy AI results with one click
  • Persistent preferences — provider, model, language, tone saved across sessions
  • Keyboard shortcutAlt+A to toggle the GenIA panel
  • Token counter — see input/output token usage per request

UI

  • Floating GenIA button (bottom-right corner)
  • Quick actions toolbar in read view
  • Modal panel with backdrop blur
  • Dark mode support
  • Fully responsive on mobile

Installation

Option 1: Git Clone (Recommended)

cd /path/to/roundcube/plugins/
git clone https://github.com/eduardostern/roundcube-genia.git lifeprisma_ai
cd lifeprisma_ai
cp config.inc.php.dist config.inc.php

Edit config.inc.php and add your API keys.

Enable the plugin in Roundcube's config/config.inc.php:

$config['plugins'] = [
    // ... your other plugins
    'lifeprisma_ai',
];

Option 2: Composer

cd /path/to/roundcube/
composer require lifeprisma/roundcube-genia

Option 3: Manual Download

  1. Download the latest release
  2. Extract to plugins/lifeprisma_ai/
  3. Copy config.inc.php.dist to config.inc.php
  4. Add your API keys and enable the plugin

Configuration

Ollama (Local — Zero Data Leaves Your Network)

<?php
$config['lifeprisma_ai_providers'] = [
    'ollama' => [
        'label'    => 'Ollama',
        'api_url'  => 'http://localhost:11434/v1/chat/completions',
        'api_type' => 'chat_completions',
        'api_key'  => '',
        'model'    => 'llama3.1',
        'models'   => ['llama3.1', 'mistral', 'qwen2.5'],
        'supports_reasoning' => false,
    ],
];

Install Ollama: curl -fsSL https://ollama.com/install.sh | sh && ollama pull llama3.1

Cloud Providers (OpenAI + Claude + Grok)

<?php
$config['lifeprisma_ai_providers'] = [
    'openai' => [
        'label'    => 'GPT',
        'api_url'  => 'https://api.openai.com/v1/responses',
        'api_type' => 'responses',
        'api_key'  => 'sk-proj-xxxxx',
        'model'    => 'gpt-5.4',
        'models'   => ['gpt-5.4', 'gpt-4.1'],
    ],
    'anthropic' => [
        'label'    => 'Claude',
        'api_url'  => 'https://api.anthropic.com/v1/messages',
        'api_type' => 'anthropic',
        'api_key'  => 'sk-ant-xxxxx',
        'model'    => 'claude-sonnet-4-6',
        'models'   => ['claude-sonnet-4-6', 'claude-haiku-4-5-20251001'],
        'supports_reasoning' => false,
    ],
    'xai' => [
        'label'    => 'Grok',
        'api_url'  => 'https://api.x.ai/v1/responses',
        'api_type' => 'responses',
        'api_key'  => 'xai-xxxxx',
        'model'    => 'grok-4.1-fast',
        'models'   => ['grok-4.1-fast', 'grok-3'],
    ],
];

Mix Local + Cloud (Best of Both Worlds)

<?php
$config['lifeprisma_ai_providers'] = [
    'ollama' => [
        'label'    => 'Local',
        'api_url'  => 'http://localhost:11434/v1/chat/completions',
        'api_type' => 'chat_completions',
        'api_key'  => '',
        'model'    => 'llama3.1',
        'models'   => ['llama3.1', 'mistral'],
        'supports_reasoning' => false,
    ],
    'openai' => [
        'label'    => 'GPT',
        'api_url'  => 'https://api.openai.com/v1/responses',
        'api_type' => 'responses',
        'api_key'  => 'sk-proj-xxxxx',
        'model'    => 'gpt-5.4',
        'models'   => ['gpt-5.4', 'gpt-4.1'],
    ],
];

Users can switch between local and cloud in the UI. Use local for privacy, cloud for quality.

API Type Reference

api_type Format Used by
responses OpenAI Responses API (/v1/responses) OpenAI, xAI
anthropic Anthropic Messages API (/v1/messages) Claude (Sonnet, Haiku, Opus)
chat_completions Chat Completions API (/v1/chat/completions) Ollama, LM Studio, LocalAI, vLLM, any OpenAI-compatible

Global Settings

Setting Default Description
lifeprisma_ai_max_tokens 2000 Maximum output tokens per request
lifeprisma_ai_temperature 0.5 Creativity (0.0-1.0). Only when reasoning is "None"

Usage

  1. Log into Roundcube webmail
  2. Open a compose window or view an email
  3. Click the GenIA button (bottom-right) or press Alt+A
  4. Choose an action, set your preferences, and generate

Keyboard Shortcuts

Key Action
Alt+A Toggle GenIA panel
Enter Submit (in the instruction field)
Shift+Enter New line in instruction
Escape Close the GenIA panel

Tips

  • Quick translate: Use the toolbar above the email — no panel needed
  • Chain actions: Compose in Portuguese, translate to English, change tone to Formal
  • Scam check: Auto-analyzes SPF, DKIM, and authentication headers
  • Persistent settings: Your provider, language, and tone are remembered

Compatibility

Roundcube PHP Browsers
1.5.x, 1.6.x 8.0+ Chrome, Firefox, Safari, Edge, Mobile

Privacy & Security

GenIA is designed with privacy-conscious self-hosters in mind:

  • Local LLM = zero data leaves your network. Point GenIA at Ollama or any local model and your emails never touch an external server
  • Cloud providers: when using OpenAI/Grok, email content is sent to their API for processing. These providers have data usage policies — API data is not used for training by default
  • API keys stay on your server — never sent to the browser
  • No telemetry, no tracking, no analytics — the plugin makes zero external calls except to your configured AI endpoint
  • No phone-home, no registration — install and use, that's it
  • Open source (MIT) — audit every line of code yourself

Recommended Setup for Maximum Privacy

Use Ollama with a local model. No API keys needed, no external calls, no data exposure:

'ollama' => [
    'label'    => 'Local',
    'api_url'  => 'http://localhost:11434/v1/chat/completions',
    'api_type' => 'chat_completions',
    'api_key'  => '',
    'model'    => 'llama3.1',
    'models'   => ['llama3.1'],
    'supports_reasoning' => false,
],

FAQ

Q: Which AI providers are supported? A: OpenAI (GPT), Anthropic (Claude), xAI (Grok), Ollama, LM Studio, LocalAI, vLLM, and any OpenAI-compatible endpoint. Responses API, Anthropic Messages API, and Chat Completions API formats are all supported.

Q: Does it send my emails to an external server? A: Only if you configure a cloud provider (OpenAI, Grok). If you use Ollama or another local LLM, zero data leaves your network. You choose.

Q: Can I run it fully offline / air-gapped? A: Yes. Use Ollama or any local model server. No internet connection needed after initial model download.

Q: How much does it cost? A: The plugin is free (MIT). If using cloud providers, you pay for API usage (~$0.001-0.01 per email). Local models are completely free.

Q: I see "GenIA is not configured yet" — what do I do? A: Your server admin needs to add API keys to the config file. See Configuration above.

Troubleshooting

"GenIA is not configured yet"

The plugin needs at least one AI provider with an API key. Create or edit your config file:

cp plugins/lifeprisma_ai/config.inc.php.dist plugins/lifeprisma_ai/config.inc.php

Then add your API keys:

<?php
$config['lifeprisma_ai_providers'] = [
    'openai' => [
        'label'   => 'GPT',
        'api_url' => 'https://api.openai.com/v1/responses',
        'api_key' => 'sk-proj-xxxxx',  // Get yours at platform.openai.com/api-keys
        'model'   => 'gpt-5.4',
        'models'  => ['gpt-5.4', 'gpt-4.1'],
    ],
];

Make sure the file is readable by your web server:

chown root:www-data plugins/lifeprisma_ai/config.inc.php
chmod 640 plugins/lifeprisma_ai/config.inc.php

"API key not configured"

This means the provider you selected doesn't have an API key set. Check your config.inc.php and make sure the api_key field is filled for each provider.

Contributing

Contributions welcome! Fork, branch, PR.

Support the Project

This plugin is 100% free and open source. If it helps you:

License

MIT License — Free to use, modify, and distribute.

See LICENSE for full terms.

Built by Eduardo Stern / LifePrisma.ai

lifeprisma/roundcube-genia 适用场景与选型建议

lifeprisma/roundcube-genia 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 3, 最近一次更新时间为 2026 年 03 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「plugin」 「email」 「translate」 「roundcube」 「assistant」 「ai」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 lifeprisma/roundcube-genia 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lifeprisma/roundcube-genia 我们能提供哪些服务?
定制开发 / 二次开发

基于 lifeprisma/roundcube-genia 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 38
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-07