muttdown


Namemuttdown JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/Roguelazer/muttdown
SummarySendmail replacement that compiles markdown into HTML
upload_time2024-05-18 23:16:51
maintainerNone
docs_urlNone
authorJames Brown
requires_python>=3.6
licenseISC
keywords email
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            muttdown
========

[![Build Status](https://github.com/Roguelazer/muttdown/actions/workflows/ci.yml/badge.svg)](https://github.com/Roguelazer/muttdown/actions/workflows/ci.yml)

`muttdown` is a sendmail-replacement designed for use with the [mutt][] email client which will transparently compile annotated `text/plain` mail into `text/html` using the [Markdown][] standard.  It will recursively walk the MIME tree and compile any `text/plain` or `text/markdown` part which begins with the sigil "!m" into Markdown, which it will insert alongside the original in a multipart/alternative container.

It's also smart enough not to break `multipart/signed`.

For example, the following tree before parsing:

    - multipart/mixed
     |
     -- multipart/signed
     |
     ---- text/markdown
     |
     ---- application/pgp-signature
     |
     -- image/png

Will get compiled into

    - multipart/mixed
     |
     -- multipart/alternative
     |
     ---- text/html
     |
     ---- multipart/signed
     |
     ------ text/markdown
     |
     ------ application/pgp-signature
     |
     -- image/png


Configuration
-------------
Muttdown's configuration file is written using [YAML][]. Example:

    smtp_host: smtp.gmail.com
    smtp_port: 587
    smtp_ssl: false
    smtp_username: foo@bar.com
    smtp_password: foo
    css_file: ~/.muttdown.css
    assume_markdown: false


If you prefer not to put your password in plaintext in a configuration file, you can instead specify the `smtp_password_command` parameter to invoke a shell command to lookup your password. The command should output your password, followed by a newline, and no other text. On OS X, the following invocation will extract a generic "Password" entry with the application set to "mutt" and the title set to "foo@bar.com":

    smtp_password_command: security find-generic-password -w -s mutt -a foo@bar.com

NOTE: If `smtp_ssl` is set to False, `muttdown` will do a non-SSL session and then invoke `STARTTLS`. If `smtp_ssl` is set to True, `muttdown` will do an SSL session from the get-go. There is no option to send mail in plaintext.

The `css_file` should be regular CSS styling blocks; we use [pynliner][] to inline all CSS rules for maximum client compatibility.

Muttdown can also send its mail using the native `sendmail` if you have that set up (instead of doing SMTP itself). To do so, just leave the smtp options in the config file blank, set the `sendmail` option to the fully-qualified path to your `sendmail` binary, and run muttdown with the `-s` flag

If `assume_markdown` is true, then all input is assumed to be Markdown by default and the `!m` sigil does nothing.

Installation
------------
Install muttdown with `pip install muttdown` or by downloading this package and running `python setup.py install`. You will need the [PyYAML][] and [Python-Markdown][] libraries, as specified in `requirements.txt`. This should work with Python 3.6+.

Usage
-----
Invoke as

    muttdown -c /path/to/config -f "from_address" -- "to_address" [more to addresses...]

Send a RFC822 formatted mail on stdin.

If the config path is not passed, it will assume `~/.muttdown.yaml`.




[Markdown]: http://daringfireball.net/projects/markdown/
[YAML]: http://yaml.org
[PyYAML]: http://pyyaml.org
[Python-Markdown]: https://pypi.python.org/pypi/Markdown
[mutt]: http://www.mutt.org
[pynliner]: https://github.com/rennat/pynliner

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Roguelazer/muttdown",
    "name": "muttdown",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "email",
    "author": "James Brown",
    "author_email": "roguelazer@roguelazer.com",
    "download_url": "https://files.pythonhosted.org/packages/fe/0e/ccb2e44e566dedd98f0395266b43ac69ee3b794f2414095e0d23232d6ec3/muttdown-0.4.0.tar.gz",
    "platform": null,
    "description": "muttdown\n========\n\n[![Build Status](https://github.com/Roguelazer/muttdown/actions/workflows/ci.yml/badge.svg)](https://github.com/Roguelazer/muttdown/actions/workflows/ci.yml)\n\n`muttdown` is a sendmail-replacement designed for use with the [mutt][] email client which will transparently compile annotated `text/plain` mail into `text/html` using the [Markdown][] standard.  It will recursively walk the MIME tree and compile any `text/plain` or `text/markdown` part which begins with the sigil \"!m\" into Markdown, which it will insert alongside the original in a multipart/alternative container.\n\nIt's also smart enough not to break `multipart/signed`.\n\nFor example, the following tree before parsing:\n\n    - multipart/mixed\n     |\n     -- multipart/signed\n     |\n     ---- text/markdown\n     |\n     ---- application/pgp-signature\n     |\n     -- image/png\n\nWill get compiled into\n\n    - multipart/mixed\n     |\n     -- multipart/alternative\n     |\n     ---- text/html\n     |\n     ---- multipart/signed\n     |\n     ------ text/markdown\n     |\n     ------ application/pgp-signature\n     |\n     -- image/png\n\n\nConfiguration\n-------------\nMuttdown's configuration file is written using [YAML][]. Example:\n\n    smtp_host: smtp.gmail.com\n    smtp_port: 587\n    smtp_ssl: false\n    smtp_username: foo@bar.com\n    smtp_password: foo\n    css_file: ~/.muttdown.css\n    assume_markdown: false\n\n\nIf you prefer not to put your password in plaintext in a configuration file, you can instead specify the `smtp_password_command` parameter to invoke a shell command to lookup your password. The command should output your password, followed by a newline, and no other text. On OS X, the following invocation will extract a generic \"Password\" entry with the application set to \"mutt\" and the title set to \"foo@bar.com\":\n\n    smtp_password_command: security find-generic-password -w -s mutt -a foo@bar.com\n\nNOTE: If `smtp_ssl` is set to False, `muttdown` will do a non-SSL session and then invoke `STARTTLS`. If `smtp_ssl` is set to True, `muttdown` will do an SSL session from the get-go. There is no option to send mail in plaintext.\n\nThe `css_file` should be regular CSS styling blocks; we use [pynliner][] to inline all CSS rules for maximum client compatibility.\n\nMuttdown can also send its mail using the native `sendmail` if you have that set up (instead of doing SMTP itself). To do so, just leave the smtp options in the config file blank, set the `sendmail` option to the fully-qualified path to your `sendmail` binary, and run muttdown with the `-s` flag\n\nIf `assume_markdown` is true, then all input is assumed to be Markdown by default and the `!m` sigil does nothing.\n\nInstallation\n------------\nInstall muttdown with `pip install muttdown` or by downloading this package and running `python setup.py install`. You will need the [PyYAML][] and [Python-Markdown][] libraries, as specified in `requirements.txt`. This should work with Python 3.6+.\n\nUsage\n-----\nInvoke as\n\n    muttdown -c /path/to/config -f \"from_address\" -- \"to_address\" [more to addresses...]\n\nSend a RFC822 formatted mail on stdin.\n\nIf the config path is not passed, it will assume `~/.muttdown.yaml`.\n\n\n\n\n[Markdown]: http://daringfireball.net/projects/markdown/\n[YAML]: http://yaml.org\n[PyYAML]: http://pyyaml.org\n[Python-Markdown]: https://pypi.python.org/pypi/Markdown\n[mutt]: http://www.mutt.org\n[pynliner]: https://github.com/rennat/pynliner\n",
    "bugtrack_url": null,
    "license": "ISC",
    "summary": "Sendmail replacement that compiles markdown into HTML",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/Roguelazer/muttdown"
    },
    "split_keywords": [
        "email"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9db7405d3fa0558f1b1c08f41b07699b0980417c629b699beb8584c89ad28aee",
                "md5": "733e39bbe264d92088d832578a577dc8",
                "sha256": "0c9c9fa5721da9477a5b16f3622a9cd2f48198c0661c40c8c68d12fbcd63c78c"
            },
            "downloads": -1,
            "filename": "muttdown-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "733e39bbe264d92088d832578a577dc8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8244,
            "upload_time": "2024-05-18T23:16:49",
            "upload_time_iso_8601": "2024-05-18T23:16:49.918464Z",
            "url": "https://files.pythonhosted.org/packages/9d/b7/405d3fa0558f1b1c08f41b07699b0980417c629b699beb8584c89ad28aee/muttdown-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe0eccb2e44e566dedd98f0395266b43ac69ee3b794f2414095e0d23232d6ec3",
                "md5": "8dc97af4a490e0fb9b8c2eec3f048901",
                "sha256": "ac3b85fba02fde632b606d99d862d44354013733251972c5afd3bbeffa8113b9"
            },
            "downloads": -1,
            "filename": "muttdown-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8dc97af4a490e0fb9b8c2eec3f048901",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11498,
            "upload_time": "2024-05-18T23:16:51",
            "upload_time_iso_8601": "2024-05-18T23:16:51.353068Z",
            "url": "https://files.pythonhosted.org/packages/fe/0e/ccb2e44e566dedd98f0395266b43ac69ee3b794f2414095e0d23232d6ec3/muttdown-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-18 23:16:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Roguelazer",
    "github_project": "muttdown",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "muttdown"
}
        
Elapsed time: 0.50337s