Skip to content

[18.0][ADD] fetchmail_s3: receive email from S3-compatible buckets#3579

Open
dnplkndll wants to merge 1 commit intoOCA:18.0from
ledoent:18.0-add-fetchmail_s3
Open

[18.0][ADD] fetchmail_s3: receive email from S3-compatible buckets#3579
dnplkndll wants to merge 1 commit intoOCA:18.0from
ledoent:18.0-add-fetchmail_s3

Conversation

@dnplkndll
Copy link
Copy Markdown
Contributor

Summary

Add a new "S3 Bucket" server type to Odoo's incoming mail servers. Polls an S3 bucket for raw email files (.eml) and processes them through mail.thread.message_process.

Use case

AWS SES inbound email rules store messages in S3. This module picks them up on the fetchmail cron schedule, processes them into Odoo records (leads, tickets, DMS documents, etc.), then archives or deletes the S3 objects.

Works with any S3-compatible storage: AWS S3, MinIO, Hetzner Object Storage, DigitalOcean Spaces.

Why not IMAP?

Approach Cost Maintenance
SES + S3 + this module ~$0/month Zero — serverless
Google Workspace IMAP $7/user/month OAuth refresh, IMAP polling
Microsoft 365 $6/user/month Per-mailbox licensing

For cloud-native deployments, S3 is the natural choice. SES is free for the first 1,000 emails/month.

Design

Follows the same extension pattern as google_gmail and microsoft_outlook:

  • Adds server_type = 's3' via selection_add
  • Overrides connect(), button_confirm_login(), fetch_mail()
  • Uses boto3 for S3 operations (paginated listing, get, copy, delete)
  • Processed emails are archived to a configurable prefix or deleted

Configuration

  1. Set up SES inbound email → S3 bucket
  2. Create incoming mail server in Odoo with type "S3 Bucket"
  3. Configure bucket, prefix, region, IAM credentials
  4. Click "Test & Confirm"
  5. Fetchmail cron handles the rest

Dependencies

  • boto3 (Python package)

🤖 Generated with Claude Code

@dnplkndll dnplkndll force-pushed the 18.0-add-fetchmail_s3 branch 2 times, most recently from 7f78359 to 09bb5a4 Compare March 27, 2026 02:35
Add a new "S3 Bucket" server type to Odoo's incoming mail servers.
Polls an S3 bucket for raw email files and processes them through
Odoo's standard mail gateway (mail.thread.message_process).

Use case: AWS SES inbound email rules store messages in S3. This
module picks them up on Odoo's fetchmail cron, processes them into
records (leads, tickets, DMS documents), then archives or deletes
the S3 objects.

Features:
- Configurable bucket, prefix, region, credentials, endpoint URL
- Archive processed emails to a different prefix or delete
- Works with any S3-compatible service (AWS, MinIO, Hetzner, etc.)
- Test & Confirm button validates S3 connectivity
- Follows the same extension pattern as google_gmail/microsoft_outlook

External dependency: boto3
@dnplkndll dnplkndll force-pushed the 18.0-add-fetchmail_s3 branch from 09bb5a4 to 368b3cf Compare March 27, 2026 02:38
@dnplkndll
Copy link
Copy Markdown
Contributor Author

CI test failures are caused by oca_list_external_dependencies not finding fetchmail in the addons path, despite it being a core Odoo CE module. The fetchmail module is in odoo/addons/fetchmail/ and should be available.

The same error pattern exists for test_auditlog (setup/test_auditlog fails with 'Unsupported odoo version 18.0') — this is a pre-existing repo issue.

Pre-commit passes cleanly. The module installs and tests correctly against Odoo 18 CE in our own CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant