~rockorager/mjmap

a sendmail-like using JMAP EmailSubmission
mk: fix installation with a custom destination dir
mk: allow overriding build flags
main: update tag for 1.0.1 release

clone

read-only
https://git.sr.ht/~rockorager/mjmap
read/write
git@git.sr.ht:~rockorager/mjmap

You can also use your local clone with git send-email.

#mjmap

a sendmail-compatible JMAP client.

mjmap uses the JMAP EmailSubmission resource to send email. Emails are uploaded to the JMAP server over https. Initially they are put in your drafts folder with the '$draft' flag. On a successful send, the emails are moved to your sent folder and the '$draft' flag is removed.

#Installation

System requirements:

  • git (to clone the repository)
  • GNU make
  • go >= 1.20
  • scdoc (to compile the man page)
git clone https://git.sr.ht/~rockorager/mjmap
gmake -C mjmap PREFIX=~/.local

#Configuration

mjmap will look for a configuration file at: $XDG_CONFIG_HOME/mjmap/config.scfg

The configuration file is very short:

account "myaccount" {
	session-url "https://api.fastmail.com/jmap/session"
	token "my_token"
	username "me@example.com"
}

#Usage

mjmap is sendmail compatible and can be used as a drop-in replacement for it, or msmtp.

Usage: mjmap [-h] [--version] [--mailbox <name>] [-S] [-d] [-t] [-f <from>] [-i] [-X <file>] [<recipients>...]

mjmap is a sendmail-compatible JMAP client.

Positional arguments:

 <recipients>...         Email addresses of recipients to send the message to.

Options:

  -h, --help             Show this help message and exit.
  --version              Print version information.
  --mailbox=<name>       Additional mailbox to add the message to, in addition
                         to Sent. Can be specified multiple times.
  -S, --server-info      Print information about the JMAP server and exit.
  -d, --debug            Print lots of debugging information.
  -t, --read-recipients  Read recipient addresses from the To, Cc, and Bcc
                         headers of the mail in addition of the ones specified
                         on the command line.
  -f, --from=<from>      Set the envelope-from address if it is missing from
                         the email headers.
  -i, --ignore-dots      Compatibility with sendmail, ignored option.
  -X, --logfile=<file>   Compatibility with sendmail, ignored option.

For example, to use for git-send-email:

[sendemail]
    sendmailcmd=mjmap

#Contributing

Patches or feature requests can be sent to ~rockorager/mjmap-dev@lists.sr.ht

Do not follow this link