---
name: "muttdown"
section: "1"
platform: "linux"
package: "muttdown"
version: "0.4.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/muttdown"
---

# muttdown(1)

Sendmail replacement that compiles markdown into HTML

## NAME

muttdown - Sendmail replacement that compiles markdown into HTML

## SYNOPSIS

**muttdown** \[-c *config\_file*\] \[-p\] -f *from\_address* \[-s\] *to\_address* ...\
 **muttdown** \[-h\]

## DESCRIPTION

**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 expects a RFC-822 formatted mail on STDIN.

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

## OPTIONS

- **-c** *CONFIG\_FILE*, **--config\_file** *CONFIG\_FILE*

  Path to YAML config file (default *~/.muttdown.yaml*)

- **-p**, **--print-message**

  Print the translated message to stdout instead of sending it

- **-f** *from\_address*, **--envelope-from** *from\_address*

  The *from* address for the email

- **-s**, **--sendmail-passthru**

  Pass mail through to **sendmail** for delivery

- **to\_address**

  The *to* address where the email is being sent

## 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.

## AUTHORS

**muttdown** was written by James Brown \<Roguelazer@gmail.com\>.

This man page was adapted from **muttdown**'s README by Stephen Gelman \<ssgelm@gmail.com\> for the Debian project and may be used by others.
