summaryrefslogtreecommitdiff
path: root/alot/db/utils.py
Commit message (Collapse)AuthorAge
* add mailto-helperPatrick Totzke2013-12-01
|
* db.utils: Use unicode for GPG error messagesSimon Chopin2013-08-13
| | | | | This patch makes the use of unicode more consistent, and enforces the UTF8 charset for the added payload in case of failure.
* Use Unicode strings when dealing with GPGSimon Chopin2013-07-24
| | | | | This delays the encoding of special chars, if any, to the actual display which is supposed to know into what it should be encoded.
* pep8&pyflakes fixesPatrick Totzke2013-07-07
| | | | mostly automatically fixed
* add helper to check if path is below anotherPatrick Totzke2013-07-07
| | | | this is used in the Database manager
* Fix the default failobj of get_paramsJustus Winter2013-06-20
| | | | | | | | | Formerly None was used as failobj, but None is not iterable and that is all that get_params does. Use list() instead which is iterable. Closes #626. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Tune the parsing of RFC 3156 style mailsJustus Winter2013-06-16
| | | | | | | | | Formerly any SMIME signed mail triggered a malformed OpenPGP message warning. Be more selective wrt what to interpret as OpenPGP data by looking at the protocol parameter first. Includes minor stylistic changes. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Fix detection of OpenPGP encrypted dataJustus Winter2013-06-16
| | | | | | | Fix detection of OpenPGP encrypted data and also check the 'protocol' parameter. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Move the parameter extraction to its own functionJustus Winter2013-06-16
| | | | | | | Move the parameter extraction to its own function and generalize it so it can be reused. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Normalize Content-Type parametersJustus Winter2013-06-16
| | | | | | | RFC 2045 specifies that parameter names are case-insensitive, so normalize them by converting them to their lower case version. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Handle missing parameters gracefullyJustus Winter2013-06-16
| | | | | | | | | OpenPGP states that the Content-Type header is annotated with parameters, namely 'protocol' and 'micalg'. Use .get() to retrieve this values with a default value to handle the case of malformed (according to RFC 3156) messages gracefully. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Parse and decrypt OpenPGP encrypted dataJustus Winter2013-06-16
| | | | | | | | | Parse and decrypt OpenPGP encrypted data as specified by RFC 3156. If such a message is detected and found to be well-formed, it is decrypted and any MIME messages found within the plain text are attached to the original message. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Verify OpenPGP signatures and display the resultJustus Winter2013-06-16
| | | | | | | Verify OpenPGP signatures as specified in RFC 3156. Display the result in the header list above the message. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* respect mailcap commands that expect stdinPatrick Totzke2013-03-20
| | | | | | | | This ensures that we respect if a command as specified per mailcap expects its input via stdin and not per tempfile. This was already done for opening of attachments but not for interpreting non-text/plain message parts. fix #584
* rename config option body_mimetype to prefer_plaintextPatrick Totzke2012-10-28
| | | | | ... and make it a type boolean. This also defines the option properly in the config spec and derives its doc froma that.
* Add body_mimetype to tweak extract_body's defaultsAntoine Amarilli2012-10-23
| | | | | | | | Add a body_mimetype global configuration option to choose the default message part to return as body in extract_body when types is None. Parts of the preferred type will be returned if present, all text/* parts will be returned if none parts of the preferred type exist. The default is "text/html", which should result in the same behavior as before.
* remove annoying debug statementPatrick Totzke2012-08-10
|
* add copyright statements to all source filesPatrick Totzke2012-06-14
| | | | cf issue #472
* Merge branch '0.3.1-feature-boolean-arguments'Patrick Totzke2012-06-13
|\
| * add helper split_commandstringPatrick Totzke2012-06-03
| | | | | | | | | | | | | | | | that splits a command string into a list of strings to pass on to subprocess.Popen and the like. This helper is now used throughout the application instead of calling shlex.split directly as this is a potential source for errors because shlex is not yet able to properly deal with unicode bytestrings.
* | fix: be more relaxed wrt non-rfc-compliant headersPatrick Totzke2012-05-31
|/ | | | | this makes db.utils.decode_header remove superflous double quotes around header values before decoding them
* fix: msg.accumulate_body doesn't return unicodePatrick Totzke2012-05-25
| | | | | | .. which triggers an assertion exception when using this as initial bodystring in an envelope. issue #451
* use parse_mailcap_nametemplate in extract_bodyPatrick Totzke2012-03-28
| | | | | .. helper that calls inline mime handler. This is just to ensure we don't duplicate too much code
* docs: fix build warningsPatrick Totzke2012-03-17
|
* backport mailcap handling to extract_bodyPatrick Totzke2012-03-17
| | | | | | | | | this makes db.urils.extract_body correctly respect mailcap as decumented in `man mailcap`: it respects nametemplate, replaces %s and %t and custom parameters like %{charset} issues #365, #406
* pep8 fixesPatrick Totzke2012-03-11
|
* docs: for db.utilsPatrick Totzke2012-03-11
|
* refactor: header utilities into db.utilsPatrick Totzke2012-03-11