2018-01-06 18:17:49 +00:00
|
|
|
.Dd January 6, 2018
|
2016-08-01 17:33:25 +00:00
|
|
|
.Dt MBLAZE 7
|
2016-07-25 15:07:08 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm mblaze
|
2018-01-22 22:21:52 +00:00
|
|
|
.Nd introduction to the mblaze message system
|
2016-07-25 15:07:08 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
message system is a set of Unix utilities for processing and
|
|
|
|
interacting with mail messages which are stored in maildir folders.
|
2016-07-25 15:07:08 +00:00
|
|
|
.Pp
|
|
|
|
Its design is roughly inspired by MH, the RAND Message Handling
|
2017-03-13 15:12:31 +00:00
|
|
|
System, but it is a complete implementation from scratch.
|
2016-07-25 15:07:08 +00:00
|
|
|
.Pp
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
consists of these Unix utilities that each do one job:
|
|
|
|
.Pp
|
2016-07-26 15:54:27 +00:00
|
|
|
.Bl -tag -width 11n -compact
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr maddr 1
|
2018-01-22 22:21:52 +00:00
|
|
|
extract mail addresses from messages
|
2016-08-02 13:50:30 +00:00
|
|
|
.It Xr magrep 1
|
2018-01-22 23:27:56 +00:00
|
|
|
search messages matching a pattern
|
2018-01-06 18:17:49 +00:00
|
|
|
.It Xr mbnc 1
|
2018-01-22 22:21:52 +00:00
|
|
|
bounce messages
|
2016-08-08 14:01:06 +00:00
|
|
|
.It Xr mcom 1
|
2018-01-22 22:21:52 +00:00
|
|
|
compose and send messages
|
2016-07-26 15:54:27 +00:00
|
|
|
.It Xr mdeliver 1
|
2018-01-22 22:21:52 +00:00
|
|
|
deliver messages or import mbox file
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mdirs 1
|
2018-01-22 22:21:52 +00:00
|
|
|
list maildir folders, recursively
|
2016-08-19 15:53:40 +00:00
|
|
|
.It Xr mexport 1
|
2018-01-22 22:21:52 +00:00
|
|
|
export messages as mbox file
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mflag 1
|
2018-01-22 22:21:52 +00:00
|
|
|
manipulate maildir flags
|
2017-07-26 15:23:01 +00:00
|
|
|
.It Xr mflow 1
|
2018-01-22 22:21:52 +00:00
|
|
|
reflow format=flowed plain text messages
|
2017-06-23 16:36:37 +00:00
|
|
|
.It Xr mfwd 1
|
2018-01-22 22:21:52 +00:00
|
|
|
forward messages
|
2016-08-01 15:22:51 +00:00
|
|
|
.It Xr mgenmid 1
|
2018-01-22 22:21:52 +00:00
|
|
|
generate a Message-ID
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mhdr 1
|
2018-01-22 22:21:52 +00:00
|
|
|
print message headers
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr minc 1
|
2018-01-22 22:21:52 +00:00
|
|
|
incorporate new messages
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mless 1
|
2018-01-22 22:21:52 +00:00
|
|
|
conveniently read messages in
|
2016-07-25 15:07:08 +00:00
|
|
|
.Xr less 1
|
|
|
|
.It Xr mlist 1
|
2018-01-22 22:21:52 +00:00
|
|
|
list and filter messages
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mmime 1
|
2018-01-22 23:27:56 +00:00
|
|
|
create MIME messages
|
2017-06-20 12:17:24 +00:00
|
|
|
.It Xr mmkdir 1
|
2018-01-22 22:21:52 +00:00
|
|
|
create new maildir folders
|
2016-07-27 16:33:46 +00:00
|
|
|
.It Xr mpick 1
|
2018-01-22 22:21:52 +00:00
|
|
|
advanced message filter
|
2016-08-08 14:01:06 +00:00
|
|
|
.It Xr mrep 1
|
2018-01-22 22:21:52 +00:00
|
|
|
reply to messages
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mscan 1
|
2018-01-22 22:21:52 +00:00
|
|
|
generate one-line message summaries
|
2016-08-01 12:55:34 +00:00
|
|
|
.It Xr msed 1
|
2018-01-22 22:21:52 +00:00
|
|
|
manipulate message headers
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mseq 1
|
2018-01-22 22:21:52 +00:00
|
|
|
manipulate message sequences
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mshow 1
|
2018-01-22 22:21:52 +00:00
|
|
|
render messages and extract MIME parts
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr msort 1
|
2018-01-22 22:21:52 +00:00
|
|
|
sort messages
|
2016-07-25 15:07:08 +00:00
|
|
|
.It Xr mthread 1
|
2018-01-22 22:21:52 +00:00
|
|
|
arrange messages into discussions
|
2016-07-25 15:07:08 +00:00
|
|
|
.El
|
2018-01-22 22:21:52 +00:00
|
|
|
.Pp
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2017-06-30 20:19:39 +00:00
|
|
|
is a classic command line MUA and has no features
|
2018-01-22 22:21:52 +00:00
|
|
|
for receiving or transferring messages;
|
2018-01-24 14:40:23 +00:00
|
|
|
you can operate on messages in a local maildir spool,
|
|
|
|
or fetch your messages using
|
2016-07-25 15:07:08 +00:00
|
|
|
.Xr fdm 1 ,
|
2018-01-22 22:21:52 +00:00
|
|
|
.Xr getmail 1 ,
|
2017-06-30 20:19:39 +00:00
|
|
|
.Xr offlineimap 1 ,
|
2018-01-22 22:21:52 +00:00
|
|
|
or similar utilities,
|
2016-07-25 15:07:08 +00:00
|
|
|
and send it using
|
2017-06-30 20:19:39 +00:00
|
|
|
.Xr dma 8 ,
|
|
|
|
.Xr msmtp 1 ,
|
2016-07-25 15:07:08 +00:00
|
|
|
.Xr sendmail 8 ,
|
|
|
|
as provided by
|
|
|
|
OpenSMTPD,
|
|
|
|
Postfix,
|
|
|
|
or similar.
|
|
|
|
.Pp
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
operates directly on maildir folders and doesn't
|
2017-06-30 20:19:39 +00:00
|
|
|
use its own caches or databases.
|
2016-07-25 15:07:08 +00:00
|
|
|
There is no setup needed for many uses.
|
2018-01-22 22:21:52 +00:00
|
|
|
All utilities have been written with performance in mind.
|
|
|
|
Enumeration of all messages in a maildir is avoided unless necessary,
|
2017-06-30 14:04:55 +00:00
|
|
|
and then optimized to limit syscalls.
|
2018-01-22 22:21:52 +00:00
|
|
|
Parsing message metadata is optimized to limit I/O requests.
|
|
|
|
Initial operations on a large maildir may feel slow, but as soon as they
|
2017-06-30 14:04:55 +00:00
|
|
|
are in the file system cache, everything is blazingly fast.
|
2018-01-22 22:21:52 +00:00
|
|
|
The utilities are written to be memory efficient
|
2018-01-22 23:27:56 +00:00
|
|
|
.Pq i.e. not wasteful ,
|
2018-01-22 22:21:52 +00:00
|
|
|
but whole messages are assumed to fit into RAM easily
|
2018-01-22 23:34:26 +00:00
|
|
|
.Pq one at a time .
|
2016-07-25 15:07:08 +00:00
|
|
|
.Pp
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
has been written from scratch and is now well tested,
|
|
|
|
but it is not 100% RFC-conforming
|
2018-01-22 23:34:26 +00:00
|
|
|
.Pq which is neither worth it, nor desirable .
|
2016-07-25 15:07:08 +00:00
|
|
|
There may be issues with very old, nonconforming, messages.
|
|
|
|
.Pp
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
is written in portable C, using only POSIX functions
|
2018-01-22 23:34:26 +00:00
|
|
|
.Pq apart from a tiny Linux-only optimization ,
|
2016-07-31 20:20:46 +00:00
|
|
|
and has no external dependencies.
|
2018-01-22 22:21:52 +00:00
|
|
|
It supports MIME and more than 7-bit messages
|
|
|
|
.Po
|
|
|
|
everything the host
|
2016-07-25 15:07:08 +00:00
|
|
|
.Xr iconv 3
|
2018-01-22 22:21:52 +00:00
|
|
|
can decode
|
|
|
|
.Pc .
|
2016-07-25 15:07:08 +00:00
|
|
|
It assumes you work in a UTF-8 environment.
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
works well with other Unix utilities such as
|
2016-07-25 15:07:08 +00:00
|
|
|
.Xr mairix 1 ,
|
2017-06-30 20:19:39 +00:00
|
|
|
.Xr mu 1 ,
|
2016-07-25 15:07:08 +00:00
|
|
|
or
|
2017-06-30 20:19:39 +00:00
|
|
|
.Xr offlineimap 1 .
|
2016-07-25 15:07:08 +00:00
|
|
|
.Sh EXAMPLES
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
utilities are designed to be composed together in a pipe.
|
2017-06-30 20:19:39 +00:00
|
|
|
They are suitable for interactive use and for scripting,
|
|
|
|
and integrate well into a Unix workflow.
|
2016-07-25 15:07:08 +00:00
|
|
|
.Pp
|
2018-01-22 22:21:52 +00:00
|
|
|
For example, you could decide you want to look at all unseen messages in your
|
2016-07-25 15:07:08 +00:00
|
|
|
INBOX, oldest first.
|
2018-01-22 23:27:56 +00:00
|
|
|
.Dl mlist -s ~/Maildir/INBOX | msort -d | mscan
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pp
|
2018-01-22 22:21:52 +00:00
|
|
|
To operate on a set of messages in multiple steps,
|
2017-06-30 20:19:39 +00:00
|
|
|
you can save it as a sequence,
|
|
|
|
e.g. add a call to
|
2016-07-26 14:39:10 +00:00
|
|
|
.Ql mseq -S
|
2017-06-30 14:04:55 +00:00
|
|
|
to the above command:
|
2018-01-22 23:27:56 +00:00
|
|
|
.Dl mlist -s ~/Maildir/INBOX | msort -d | mseq -S | mscan
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pp
|
2016-07-25 15:07:08 +00:00
|
|
|
Now mscan will show message numbers and you could look at the first
|
2018-01-22 22:21:52 +00:00
|
|
|
five messages at once, for example:
|
2016-07-25 15:07:08 +00:00
|
|
|
.Dl mshow 1:5
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pp
|
2018-01-22 22:21:52 +00:00
|
|
|
Likewise, you could decide to incorporate
|
|
|
|
.Po
|
|
|
|
by moving from
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pa new
|
|
|
|
to
|
2018-01-22 22:21:52 +00:00
|
|
|
.Pa cur
|
|
|
|
.Pc
|
|
|
|
all new messages in all folders,
|
2017-06-30 20:19:39 +00:00
|
|
|
thread it and look at it interactively:
|
2018-01-22 23:27:56 +00:00
|
|
|
.Dl mdirs ~/Maildir | xargs minc | mthread | mless
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pp
|
2018-01-22 22:21:52 +00:00
|
|
|
Or you could list the attachments of the 20 largest messages in your INBOX:
|
2018-01-22 23:27:56 +00:00
|
|
|
.Dl mlist ~/Maildir/INBOX | msort -S | tail -20 | mshow -t
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pp
|
2018-01-22 22:21:52 +00:00
|
|
|
Or apply the patches from the current message:
|
2016-07-25 15:07:08 +00:00
|
|
|
.Dl mshow -O . '*.diff' | patch
|
2017-06-30 20:19:39 +00:00
|
|
|
.Pp
|
2016-07-25 15:07:08 +00:00
|
|
|
As usual with pipes, the sky is the limit.
|
|
|
|
.Sh CONCEPTS
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2018-01-22 22:21:52 +00:00
|
|
|
deals with messages
|
2018-01-22 23:34:26 +00:00
|
|
|
.Pq which are files ,
|
2018-01-22 22:21:52 +00:00
|
|
|
folders
|
2018-01-22 23:34:26 +00:00
|
|
|
.Pq which are maildir folders ,
|
2018-01-22 22:21:52 +00:00
|
|
|
sequences
|
|
|
|
.Po
|
|
|
|
which are newline-separated lists of messages, possibly saved on disk in
|
|
|
|
.Pa ${MBLAZE:-$HOME/.mblaze}/seq
|
|
|
|
.Pc ,
|
|
|
|
and the current message
|
|
|
|
.Po
|
|
|
|
kept as a symlink in
|
|
|
|
.Pa ${MBLAZE:-$HOME/.mblaze}/cur
|
|
|
|
.Pc .
|
2016-07-25 15:07:08 +00:00
|
|
|
.Pp
|
2017-06-30 14:04:55 +00:00
|
|
|
Messages in the saved sequence can be referred to using special
|
2016-07-25 15:07:08 +00:00
|
|
|
syntax as explained in
|
|
|
|
.Xr mmsg 7 .
|
|
|
|
.Pp
|
|
|
|
Many utilities have a default behavior when used interactively from a terminal
|
2018-01-22 23:34:26 +00:00
|
|
|
.Pq e.g. operate on the current message or the current sequence .
|
2016-07-25 15:07:08 +00:00
|
|
|
For scripting, you must make these arguments explicit.
|
2017-02-20 14:39:21 +00:00
|
|
|
.Pp
|
|
|
|
For configuration, see
|
|
|
|
.Xr mblaze-profile 5 .
|
2016-07-25 15:07:08 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mailx 1 ,
|
2017-02-20 14:39:21 +00:00
|
|
|
.Xr mblaze-profile 5 ,
|
2016-07-25 15:07:08 +00:00
|
|
|
.Xr nmh 7
|
|
|
|
.Sh AUTHORS
|
2017-01-21 16:17:12 +00:00
|
|
|
.An Leah Neukirchen Aq Mt leah@vuxu.org
|
2017-06-23 17:31:02 +00:00
|
|
|
.Pp
|
|
|
|
There is a mailing list available at
|
2017-06-30 14:34:13 +00:00
|
|
|
.Mt mblaze@googlegroups.com
|
2018-01-22 22:21:52 +00:00
|
|
|
.Po
|
|
|
|
to subscribe, send a message to
|
|
|
|
.Mt mblaze+subscribe@googlegroups.com
|
|
|
|
.Pc
|
|
|
|
and an IRC channel
|
2017-06-23 17:31:02 +00:00
|
|
|
.Li #vuxu
|
|
|
|
on irc.freenode.net.
|
2018-01-22 22:21:52 +00:00
|
|
|
Please report security-related bugs directly to the author.
|
2016-07-25 15:07:08 +00:00
|
|
|
.Sh LICENSE
|
2016-08-01 17:33:25 +00:00
|
|
|
.Nm
|
2016-07-25 15:07:08 +00:00
|
|
|
is in the public domain.
|
|
|
|
.Pp
|
|
|
|
To the extent possible under law,
|
|
|
|
the creator of this work
|
|
|
|
has waived all copyright and related or
|
|
|
|
neighboring rights to this work.
|
|
|
|
.Pp
|
|
|
|
.Lk http://creativecommons.org/publicdomain/zero/1.0/
|