Provides a mail content type and a mail-in behavior
ftw.mail provides a dexterity based mail contenttype which allows you to upload emails to your Plone site. This includes extracting of important data of the email, like:
- Mail header
- Body text
- Unwrap attached emails (msg).
The major feature of ftw.mail is the inbound mail functionality. Mail inbound allows you to send emails directly to your Plone site. An email sent to Plone will be extracted and created as mail contenttype automatically.
- There must be a registered user with the sender email address
- The user must have enough permissions to add a mail object in the folder
- The email will be created with the security context of the sender
What is the email address?
The localpart of the email address is a unique identifier that identifies the respective folderish object. The default implementations uses the object’s UUID. The mail-in address will automatically shown in a viewlet if ftw.mail.mail content type is addable.
- Add ftw.mail to your buildout configuration:
[instance] eggs += ftw.mail
- Install the generic setup import profile.
Enable Mail-Inbound Feature
Install the mta2plone.py script somewhere in the PATH of your server. Make sure mta2plone.py is executable (chmod +x mta2plone.py).
Example Postfix configuration in /etc/postfix/virtual:
inbound.example.org anything @inbound.example.org inbound-example
inbound-example: "|/path/to/mta2plone.py http://127.0.0.1:8080/Plone/mail-inbound"
Remember to run the newaliases command (as root) after you update /etc/aliases in order for Postfix to pick up the changes.
For local testing it is also possible to start the mta2plone.py in a console and paste the raw mail to STDIN:
./mta2plone.py http://127.0.0.1:8080/Plone/mail-inbound recipient-email
(Since the mta2plone.py script will read from STDIN, you’ll need to send an EOF using CTRL-D after you pases the mail contents.)
Runs with Plone 4.3.
This package is copyright by 4teamwork.
ftw.mail is licensed under GNU General Public License, version 2.
- Add special handling for signed/multipart message attachments. [deiferni]
- Improve header decoding when encoded words are not separated by whitespace. [mbaechtold]
- Fix upgrade when uninitialized header chaches are present. [deiferni]
- Drop support for Plone 4.2. [lgraf]
- Log common errors in inbound mail view. [lgraf]
- Recurse the sizes of nested multipart attachments. [Rotonen]
- Fix treatment of invalid mail dates [njohner]
- Fix sorting on dates for E-mails [njohner]
- Cleanup: Revert LWSP regex and move changes from v2.5.1 into a separate regex since they solve different issues.
- Remove newlines from headers, even inside encoded words. decode_header from the email module splits the header before parsing which breaks up encoded words and prevents them from being decoded. https://github.com/python/cpython/blob/2.7/Lib/email/header.py#L78 [lknoepfel]
- Move functionality to create mailed-in mails to an adapter to allow easier customization. [deiferni]
- Fix setting defaults for choices with named vocabularies on inbound mails. [phgross]
- Mark inbound request with a marker interface. [phgross]
- Drop Plone 4.1 support. [phgross]
- Fix German and French FTI title of “ftw.mail.mail”. [mbaechtold]
- Fix broken <meta /> tags in text/html MIME parts. [lgraf]
- Sort Mailtab so the newest Mail is the first Item. [tschanzt]
- Make upgrade step to fix message.contentType more defensive to avoid trouble during upgrades caused by caching weirdness. [lgraf]
- Make sure message.contentType is stored as str, not unicode. Otherwise this will result in “Wrong contained type” when trying to save the object again. Includes Upgrade-Step to fix existing objects. [lgraf]
- get_header(): Fix up RFC 2047 encoded words separated by ‘CRLF LWSP’ (which is fine according to the RFC) by replacing the CRLF with a SPACE so decode_header can parse them correctly. This works around a bug in decode_header that has been fixed in 3.3. See http://bugs.python.org/issue4491 and its duplicate. [lgraf]
- Make RegEx for Apple Partial Encoding regex more specific so we don’t accidentally remove quotes around header parts that need them. [lgraf]
- Added test for zip export. [lknoepfel]
- Refactor mail view to include all HTML parts. [jone]
- Enable referencablebehavior for mails. [jone]
- Parse <style> tags inside the mail using the premailer transform. [phgross]
- Made mail view XSS-save using the safe-html transform for the mail-body display. [phgross]
- Fix an issue while generating links to image-attachments in mails. [deiferni]
- SearchableTextExtender: For mails with incorrectly declared charset, try decoding them as latin1 as a last resort, ignoring all errors. [lgraf]
- SearchableTextExtender: Don’t just decode the Content-Transfer-Encoding, but also decode the actual content itself with the declared charset. [lgraf]
- Fix brown bag upgrade step from 2.2.0. [jone]
- Store the title from the mail subject on the object, so that we don’t have to read the message for retreiving the title on access.
- Cache attachment infos on mail object.
- Cache headers for tabbed view.
Make sure only a default value will be set for IMailSettings.mail_domain, but an existing value won’t be overwritten when running the upgrade step twice. [lgraf]
- Inbound view: Adapt container as the context instead of content when looking up default value adapter. [lgraf]
- Inbound view: Remove AQ wrapper when setting default values for newly created objects, in order to not get bogus results (due to acquisition) when checking whether a field is already present on the object. [lgraf]
- Fix From-/To-/Cc-Header encoding problem with Apple Mail. [jone]
- Made primary field also for dexterity-1 installations working. [phgross]
- Added French translation by I. Anthenien. [lknoepfel]
- Remove “validate_sender” configuration setting. We always require the sender to be valid. [jone]
- Refactor inbound view so that customization and error-handling is easier possible. [jone]
- Improve searchable text to index attachments recursively. [jone]
- Added registry entry ‘mail_domain’ in upgrade step to 2000. [lknoepfel]
- Fix tests for Plone 4.1.x - 4.2.x by using a compatible ftw.workspace version. [mathias.leimgruber]
- Make mail tab date parsing robust. [jone]
- Disable sorting in mail tab for header information columns. Sorting header informations does currently not work because the information is not in the catalog. When doing it outside the catalog we could run into performance issues when we have many mails, therefore we disable it for now. [jone]
- Use plone default classes for table styling. [Julian Infanger]
- Fixed response content-type in inbound view. [lknoepfel]
- Revoke “ftw.mail: Add Mail” permission. This permission makes the “mail” type show up in the add menu. Only admins (Manager) should be able to add new mails through the add menu, the normal use case is sending the mails via inbound. Also change the lawgiver hint to ingnore this permission. [jone]
- Add ftw.lawgiver support. [mathias.leimgruber]
- Add mail tab for ftw.workspace. [mathias.leimgruber]
- Implement mail-in as viewlet. [mathias.leimgruber]
- Add readme. [mathias.leimgruber]
- Add IEmailAddress adapter, so it’s easy to change the behavior of generating the email address of a destination and getting the destination of a given email address.(Dropped the destination resolver) [mathias.leimgruber]
- Add uuid support and drop intid. [mathias.leimgruber]
- Use view.pt for mail content type’s default view. [mathias.leimgruber]
- Ungrock the package. [mathias.leimgruber]
- Fix test setup for plone 4.3 and intid. [mathias.leimgruber]
- Add plone 4.3.x tests cfg and development.cfg. [mathias.leimgruber]
- Set default values on all fields in the inbound mail creation. Issue #222 Metadaten Standort und Sprache https://extranet.4teamwork.ch/support/ph-vs/tracker/222/ [philippegross]
- Fixed BeautifulSoup related encoding bug when unwrapping html body. [lgraf]
- Fix filename encoding handling. [jone]
- Inbound mail: Get recipient from env variable set by MTA, not from To header. This allows for mails with multiple recipients in the To header, and the Plone destination address doesn’t need to be listed first anymore. Issue #1312 Fehler E-Mail mit mehreren Adressaten https://extranet.4teamwork.ch/projects/opengever-kanton-zug/sprint-backlog/1312/ [lgraf]
- Make intids work in tests (register IIntIds utility explicitely) [lgraf]
- Added some French translations [ttschanz]
- Fixed msg getter, it works now also with mails without a subject. [phgross]
- Fixing long subject headers separated by nt before creating email.message object. [lgraf]
- Added test to test mail creation with weird characters in subject. [lgraf]
- Normalizing subject before using it as an ID to create a mail object. [lgraf]
- Changed default encoding to ‘utf-8’ for the safe_utf8 method. Should fix decoding problem in mail subjects. Issue #1209 Falsche Umlaute bei importierten Mails https://extranet.4teamwork.ch/projects/opengever-kanton-zug/sprint-backlog/1209 [phgross]
- changed fallback encoding in the get_payload method for msg objects without a correct charset information. So we could fix display errors in mails with non-ascii characters in the mail body. [phgross]
- changed deprecated grok.CodeView to grok.View [eschmutz]
- added test-buildout for plone 4.1 [eschmutz]
- Fix tests [eschmutz]
- Implements Blob support, use now NamedBlobFiles instead of NamedFiles [phgross]
- Issue #1134 Test Gelb 2.0.3: Nicht korrekte Dateiendung beim Extrahieren eines Dokuments mit Umlaut aus Mail https://extranet.4teamwork.ch/projects/opengever-kanton-zug/sprint-backlog/1134/ added fallback in the get_filename method for allready decoded filenames tuple [phgross]
- Fixed message value creation: filename must be in unicode, that it works with the new plone.namedfile 1.0.3 [phgross]
- Added dummy setter for title property so it doesn’t fail with an AttributeError when trying to set the title of a ftw.mail.mail object. [lgraf]
- Added missing dependency on collective.dexteritytextindexer in setup.py [lgraf]
- Pinned zope.component=3.8.0 in test-plone-4.0.x.cfg to resolve version conflict [lgraf]
- Added DynamicTextIndexExtender to add message body to searchableText [lgraf]
- Changed minor typo in German translation. [phabegger]
- According to rfc 2047, multiple encoded words are seperated by space: fixed tests. [jbaumann]
- Created safe_decode_header util function, which handles the encoding properly for get_filenames according to rfc 2047. This solves a test issue. [jbaumann]
- Added support for nested multipart emails where the attachment is within another part of the message. [jbaumann]
- Removed save_attachments: moved to opengever.mail since its opengever specific [02.11.2010, jbaumann]
- Added remove_attachments method [01.11.2010, jbaumann]
- Added test for filename encoding problem. Test still fails… [Thomas Buchberger]
- Moved unwrapping of attached messages into utility method. Added test. [Thomas Buchberger]
- Correctly restore current SecurityManger after mail creation. [Thomas Buchberger]
- Added tests for unknown sender [Thomas Buchberger]
- Initial release
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ftw.mail-2.7.0.tar.gz (646.8 kB)||File type Source||Python version None||Upload date||Hashes View|