~rockorager/mjmap

a sendmail-like using JMAP EmailSubmission
config: implement token-cmd
main: add -t sendmail compat flag
log: remove unix constants

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

go install git.sr.ht/~rockorager/mjmap

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

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

[sendemail]
    sendmailcmd=mjmap

mjmap supports the following mjmap-specific flags:

  • --mailbox=<name> add the message to , in addition to Sent. This flag can be used multiple times, or with commas separating the mailboxes. Names must match exactly.

mjmap supports the following msmtp flags:

  • -S, --server-info prints server information
  • -d, --debug prints logs
  • --version prints the version

mjmap supports the following sendmail flags:

  • -f, --from set the envelope-from address
  • -i, --ignore-dots ignore dots alone on lines
  • -X, --logfile set or unset the log file

#Contributing

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