GNU Mailutils

 [image of the Head of a GNU]

Table of Contents

Introduction to Mailutils

GNU Mailutils is a rich and powerful protocol-independent mail framework. It contains a series of useful mail libraries, clients, and servers. These are the primary mail utilities for the GNU system. The central library is capable of handling electronic mail in various mailbox formats and protocols, both local and remote. Specifically, this project contains a POP3 server, an IMAP4 server, and a Sieve mail filter. It also provides a POSIX `mailx' client, and a collection of other handy tools.

The GNU Mailutils libraries supply an ample set of primitives for handling electronic mail in programs written in C, C++, Python or Scheme.

At the core of Mailutils is libmailutils, a library which provides universal access to various mailboxes and protocols: UNIX mailbox, Maildir, MH, POP3, IMAP4, Sendmail, SMTP. Mailutils offers functions for almost any mail-related task, such as parsing of messages, email addresses and URLs, handling MIME messages, listing mail folders, mailcap facilities, extensible Sieve filtering, access control lists. It supports various modern data security and authentication techniques: TLS encryption, SASL and GSSAPI, to name a few. The framework is able to work with a wide variety of authorization databases, ranging from traditional system password database up to RADIUS, SQL and LDAP.

The utilities provided by Mailutils include imap4d and pop3d mail servers, mail reporting utility comsatd, general-purpose mail delivery agent maidag, mail filtering program sieve, and an implementation of MH message handling system.

This software is part of the GNU Project and is copyrighted by the Free Software Foundation. All libraries are distributed under the terms of the Lesser GNU Public License. The documentation is licensed under the GNU FDL, and everything else is licensed under the GNU GPL.

Following is a short description of the mail utilities. All utilities share the same subset of command line options and use a unified configuration mechanism, which allows to easily configure the package as a whole.



The Mailutils' imap4d implements Internet Message Access Protocol, version 4rev1 as per RFC 2060. It supports Namespace capability and GSSAPI authentication mechanism.


Pop3d is a daemon implementing Post Office Protocol server.


Comsatd is the program notifying users about incoming e-mail. Being highly configurable, this implementation of comsatd gives the user full control over the notification method. It also includes a protection mechanism against some well-known comsatd attacks.

Mail Delivery Agents

Mailutils provides mail delivery agents for local delivery and for remote delivery via SMTP protocol.


The name maidag stands for Mail Delivery Agent. It is a general-purpose MDA offering a rich set of features. It can operate both in traditional mode, reading the message from its standard input, and in LMTP mode. Maidag is able to deliver mail to any mailbox format, supported by GNU Mailutils.


This is an interface program used by GNU Emacs rmail module to read user's incoming mail. It contains a number of improvements over the standard movemail version while being compatible with the existent rmail.el.

The version of rmail.el distributed with GNU Emacs takes advantage of all the features provided by our movemail.

Command Line Utilities


The frm command outputs headers from the selected messages in a mailbox.


Mail is a replacement for /bin/mail and /bin/mailx. While being compatible with those, mail understands various mailbox formats (including remote mailboxes, via pop3 or imap4d protocol), provides extended line-editing capabilities, is fully configurable and is able to decode MIME messages.


Messages prints on standard output the number of messages contained in each folder specified in command line. If no folders are specified, it operates upon user's system mailbox.


Readmsg extracts from the mailbox messages matching a given set of criteria and prints their contents on the standard output.

MH utilities

This is a set of utilities compatible with MH Message Handling System.

While being backward compatible with both standard mh and nmh, our implementation of MH offers all the flexibility and power of GNU Mailutils. It has been designed to interoperate flawlessly with GNU Emacs MH-E interface. Newer versions of MH-E provide support for extended features of GNU Mailutils MH.

Mail Filtering Utilities

Mailutils offers support for two mail processing languages: Sieve and Scheme.


Guimb stands for "Guile for MailBoxes". It is designed to provide for mailboxes the same functionality that awk provides for text files. It processes mailboxes, applying the user-supplied Scheme programs to each of them in turn and saves the resulting output in required mailbox format.


Mailutils provides two implementations of the Sieve language (RFC 3028): a standalone program sieve, and sieve.scm -- a Sieve compiler written entirely in Scheme. Both provide full support for the Sieve language with a set of extensions.

Sieve takes a Sieve script and applies it to the given mailbox.

Sieve.scm translates a Sieve script into an equivalent Scheme program and optionally applies it to the given set of mailboxes. The produced Scheme program can be used as a plug-in filter for mail.local utility.

Language extensions, such as new tests, actions and comparators, can be easily added to both implementations.

Downloading Mailutils

GNU Mailutils can be downloaded from or one of the mirrors.

The latest stable release of GNU Mailutils is version 2.2, released on September 9, 2010.

For more information about the project, including news, bug reports and patches, please see the project's home page on Savannah.

Alpha releases of the package are available from


Complete documentation in TeXinfo format is included in the distribution. An online manual is available.

Mailing Lists

Mailing list bug-mailutils at is currently used for bug reports and discussions regarding GNU Mailutils. To subscribe to the list, visit Archives available.

Free Software that Uses Mailutils

The following free software packages use GNU Mailutils:

  1. MH-E
  2. Mailfromd
  3. Wyslij-po
  4. Wydawca

If you know of some packages not listed here, please let us know so we can keep this list up-to-date.

Request an Enhancement

If you would like any new feature to be included in future versions of Mailutils, please send a request to bug-mailutils at

Please remember that development of Mailutils is a volunteer effort, and you can also contribute to it. For information about contributing to the GNU Project, please read How to help GNU.

Report a Bug

If you think you have found a bug in Mailutils, then please send as complete a report as possible to bug-mailutils at


GNU Mailutils is currently being maintained by Sergey Poznyakoff.

Translations of this page

Please see the Translations README for information on coordinating and submitting translations of this article.