E-Mail to Post
Import received emails (e.g., newsletters) as posts into your HumHub spaces or profile.
Requirements
- HumHub 1.18 or higher
- IMAP email account with SSL support
Features
- Automatic hourly import of emails from IMAP mailboxes
- Flexible targeting: Import emails into spaces or user profiles
- Automatic archiving: Imported emails are moved to a "posted" subfolder in your e-mail account
- Attachment support: Email attachments are uploaded to HumHub
- Content filtering: URL blacklist (admin) and keyword filter (user)
- Permission control: User group-based access management
User Configuration
Authorized users can configure their IMAP connection in Account Settings → E-Mail to Post:
IMAP Connection Setup
Server Settings
- Server URL (e.g.,
imap.gmail.com)
- Port (default: 993 for SSL)
- Username (usually your email address)
- Password
Folder Mapping
- Select email folders to monitor
- Connect each folder to a HumHub space or your profile
Recommendation: Create a separate email folder for emails that should be imported. Once imported, emails are automatically moved to a subfolder named "posted" to prevent duplicate imports.
Tested Email Providers
- Self-hosted Plesk-based email servers
- All-Inkl email servers
- Gmail (requires application password)
How to connect to Gmail
To connect to Gmail, you must use an application password instead of your regular password.
See: https://support.google.com/accounts/answer/185833
How It Works
Hourly Import
The import runs automatically every hour via HumHub's cron system. Emails from specified mailboxes are imported as posts in the configured target spaces/profiles.
Attachments
Attachments are fetched from the email server and uploaded as attachments to the email post.
Group Permission
The module introduces a user group permission that controls who can import emails.
Default: Only the Administrator user group has this permission.
Administration
Administrators can access module settings in Administration → E-Mail to Post:
1. Import Limit per User
Define a maximum number of emails that can be imported per user per import to prevent spam.
2. URL Blacklist
Define patterns for URLs that should be removed from imported emails. Matching links will be removed, meaning the text will become unclickable.
Format: One pattern per line. Wildcards (*) are supported.
Keyword Filter (Experimental)
Users can define keywords to filter out unwanted content in Account Settings → E-Mail to Post → Experimental.
Use Case: Remove newsletter footers containing keywords like "Unsubscribe" along with their surrounding elements (e.g., the email footer).
How It Works:
- Only works for HTML emails (not plain text)
- Hides elements that contain a keyword
- Primarily tested for footer removal
Important: Filtered content is only hidden (commented out in HTML), not permanently deleted. Do not use this feature to hide sensitive or private information.
Important Notes
⚠️ Security Warning:
This module does not perform spam filtering. Only connect email folders you have full control over.
Best Practices:
- Do not connect your main Inbox folder
- Use dedicated folders for imports
- Manually move trusted emails to the import folder, or
- Set up restrictive email filters on your mail server
Known Limitations:
- Images that are embedded in emails via URL won't be shown with HumHub's default Content Security Policy (CSP) settings
- The keyword removal is experimental and might be replaced by another filtering strategy in the future depending on user feedback
Troubleshooting
IMAP Connection Failed
- Verify server URL, port (993 for SSL), username, and password
- For Gmail: Ensure you're using an application password
- Check that your email provider allows IMAP connections
Emails Not Importing
- Check that the user has the "E-Mail to Post" permission
- Verify the user has "Create Post" permission in the target space
- Check that the folder mapping is correctly configured
Contact
info@felixwebdesign.de