1# Installing NeoMutt 2 3NeoMutt is a command line email client (Mail User Agent). 4It's fast, powerful and flexible. 5 6The simplest way to obtain NeoMutt is to use your OS's package. 7See the [distro page](https://neomutt.org/distro.html) to see if there's one for you. 8 9## Obtaining the Source 10 11The source can be downloaded from our project site on GitHub. 12It's available as a git repository or a 'tar.gz' archive. 13 14### Git 15 16Clone the NeoMutt repository: 17 18``` 19git clone https://github.com/neomutt/neomutt 20``` 21 22It's recommended to use the latest tagged version. 23The 'master' branch is used for development and may not be as stable. 24 25### Source Archive 26 27The latest release of NeoMutt can be found, here: 28 29- https://github.com/neomutt/neomutt/releases/latest 30 31All source releases are signed for security. 32See [Signing Releases](https://neomutt.org/dev/signing#source-example) for details. 33 34## Building NeoMutt 35 36To build NeoMutt, you will need, at the very minimum: 37 38- A C99 compiler such as gcc or clang 39- SysV-compatible curses library: ncurses 40- Some common libraries, such as iconv and regex 41- DocBook XSL stylesheets and DTDs (for building the docs) 42 43NeoMutt's build system uses [Autosetup](https://msteveb.github.io/autosetup/). 44It depends on [Tcl](https://tcl.tk) and [Jim](http://jim.tcl.tk) to run its test scripts. 45If they aren't available, Autosetup will use a version bundled with NeoMutt. 46 47### Configure 48 49Autosetup's `configure.autosetup` performs two tasks. It allows the user to 50enable/disable certain features of NeoMutt and it checks that all the build 51dependencies are present. 52 53For a list of the currently supported options and a brief help text, run: 54`./configure.autosetup --help` 55 56| Configure option | Path | Notes | 57| :---------------------- | :--- | :------------------------------------------- | 58| `--with-ncurses=path` | | Location of ncurses | 59| | | | 60| `--gpgme` | Path | GPG Made Easy | 61| `--gnutls` | Path | Gnu TLS (SSL) | 62| `--gss` | Path | Generic Security Services | 63| `--sasl` | Path | Simple Authentication and Security Layer | 64| `--ssl` | Path | OpenSSL | 65| | | | 66| `--fmemopen` | | Optional Feature (Dangerous) | 67| `--lua` | Path | Optional Feature | 68| `--notmuch` | Path | Optional Feature | 69| `--mixmaster` | | Optional Feature | 70| | | | 71| `--bdb` | Path | Header cache backend | 72| `--gdbm` | Path | Header cache backend | 73| `--kyotocabinet` | Path | Header cache backend | 74| `--lmdb` | Path | Header cache backend | 75| `--qdbm` | Path | Header cache backend | 76| `--tokyocabinet` | Path | Header cache backend | 77| | | | 78| `--with-lock=CHOICE` | | Select 'fcntl' or 'flock' | 79| `--locales-fix` | | Workaround for broken locales | 80| `--disable-nls` | Path | National Language Support (translations) | 81| `--disable-pgp` | Path | Pretty Good Privacy | 82| `--disable-smime` | Path | Secure/Multipurpose Internet Mail Extensions | 83| `--disable-idn` | Path | Internationalised domain names | 84| | | | 85| `--with-domain=DOMAIN` | | Default email domain | 86| `--with-mailpath` | Path | Location of spooled mail | 87| `--homespool` | Path | Spooled mail is in user's home dir | 88| | | | 89| `--prefix` | Path | Target directory for build (default: `/usr`) | 90| `--disable-doc` | | Don't build the docs | 91| `--full-doc` | | Document disabled features | 92| `--quiet` | | Only show the summary | 93 94The options marked "Path" have either take a path, or have an extra option for 95specifying the library path. 96e.g. `./configure --notmuch --with-notmuch=/usr/local/lib/notmuch` 97 98The parameter `--prefix` is used to specify both the default search path for 99headers and libraries and the final directory structure of the installed files. 100These are often the same: if you have your dependencies installed in 101`/usr/include` and `/usr/lib`, you also probably want the NeoMutt executable to 102end up in `/usr/bin` and its documentation in `/usr/share/doc`. This behavior 103can be tweaked by specifying where 3rd party dependencies are to be found. This 104is done on a per-dependency basis using the `--with-<dep>=path` family of 105options. As an example, a GPGME installation in `/opt` can be looked up using 106the arguments `--gpgme --with-gpgme=/opt`. 107 108The build can be adjusted by setting any of six environment variables: 109 110- `CC` - set the compiler 111- `CFLAGS` - replace **all** the compiler flags 112- `EXTRA_CFLAGS` - append flags to the default compiler flags 113- `LD` - set the linker 114- `LDFLAGS` - replace **all** the linker flags 115- `EXTRA_LDFLAGS` - append flags to the default linker flags 116 117e.g. `make EXTRA_CFLAGS=-g` 118 119Here are the sample commands to configure and build NeoMutt: 120 121``` 122./configure --gnutls --gpgme --gss --sasl --tokyocabinet 123make 124``` 125 126### Install / Uninstall 127 128NeoMutt will be installed into the directory configured with `--prefix`. 129This can be modified using the `DESTDIR` make variable, for example when doing 130staged builds. `DESTDIR` is prepended to the install path. 131 132To install NeoMutt to the configured location, run: 133 134``` 135make install 136``` 137 138To override the root directory, use the `DESTDIR` make variable, e.g. 139 140``` 141make DESTDIR=$HOME/install install' 142``` 143 144To uninstall NeoMutt from the configured location, run: 145 146``` 147make uninstall 148``` 149 150To override the root directory, use the `DESTDIR` make variable, e.g. 151 152``` 153make DESTDIR=$HOME/install uninstall' 154``` 155 156