v1.0.0-beta
The new API of the configuration file contains breaking changes, see config.sample.toml for a documented example of this new API.
You can even test it:
# save the sample config locally
curl https://raw.githubusercontent.com/soywod/himalaya/master/config.sample.toml > config.sample.toml
# spawn a testing IMAP/SMTP server using docker
docker run -it --rm -p 3025:3025 -p 3110:3110 -p 3143:3143 -p 3465:3465 -p 3993:3993 -p 3995:3995 -e GREENMAIL_OPTS='-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose' greenmail/standalone:latest
# test the CLI using the sample config
himalaya -c ./config.sample.toml envelope list
Few major concepts changed:
- The concept of Backend and Sender changed. The Sender does not exist anymore (it is now a backend feature). A Backend is now a set of features like add folders, list envelopes or send raw message. The backend of every single feature can be customized in the configuration file, which gives users more flexibility. Here the list of backend features that can be customized:
backend
(required): the backend used by default by all backend features (maildir
,imap
ornotmuch
)folder.add.backend
: override the backend used for creating folders (maildir
,imap
ornotmuch
)folder.list.backend
: override the backend used for listing folders (maildir
,imap
ornotmuch
)folder.expunge.backend
: override the backend used for expunging folders (maildir
,imap
ornotmuch
)folder.purge.backend
: override the backend used for purging folders (maildir
,imap
ornotmuch
)folder.delete.backend
: override the backend used for deleting folders (maildir
,imap
ornotmuch
)envelope.list.backend
: override the backend used for listing envelopes (maildir
,imap
ornotmuch
)envelope.get.backend
: override the backend used for getting envelopes (maildir
,imap
ornotmuch
)envelope.watch.backend
: override the backend used for watching envelopes (maildir
,imap
ornotmuch
)flag.add.backend
: override the backend used for adding flags (maildir
,imap
ornotmuch
)flag.set.backend
: override the backend used for setting flags (maildir
,imap
ornotmuch
)flag.remove.backend
: override the backend used for removing flags (maildir
,imap
ornotmuch
)message.send.backend
(required): override the backend used for sending messages (sendmail
orsmtp
)message.read.backend
: override the backend used for reading messages (maildir
,imap
ornotmuch
)message.write.backend
: override the backend used for adding flags (maildir
,imap
ornotmuch
)message.copy.backend
: override the backend used for copying messages (maildir
,imap
ornotmuch
)message.move.backend
: override the backend used for moving messages (maildir
,imap
ornotmuch
)
- The CLI API changed: every command is now prefixed by its domain following the format
himalaya <domain> <action>
. List of domain available by runninghimalaya -h
and list of actions for a domain by runninghimalaya <domain> -h
. - TOML configuration file options use now the dot notation rather than the dash notation. For example,
folder-listing-page-size
becamefolder.list.page-size
. See the changed section below for more details.
Added
- Added cargo feature
maildir
(not plugged yet). - Added cargo feature
sendmail
(not plugged yet). - Added watch hooks
envelope.watch.received
(when a new envelope is received) andenvelope.watch.any
(for any other event related to envelopes). A watch hook can be:-
A shell command:
envelope.watch.any.cmd = "mbsync -a"
-
A system notification:
envelope.watch.received.notify.summary = "📬 New message from {sender}"
: customize the notification summary (title)envelope.watch.received.notify.body = "{subject}"
: customize the notification body (content)
Available placeholders: id, subject, sender, sender.name, sender.address, recipient, recipient.name, recipient.address.
-
- Added watch support for Maildir backend features.
Changed
- Renamed cargo feature
imap-backend
→imap
. - Renamed cargo feature
notmuch-backend
→notmuch
. - Renamed cargo feature
smtp-sender
→smtp
. - Changed the goal of the config option
backend
: it is now the default backend used for all backend features. Valid backends:imap
,maildir
,notmuch
. - Moved
folder-aliases
config option tofolder.alias(es)
. - Moved
folder-listing-page-size
config option tofolder.list.page-size
. - Moved
email-listing-page-size
config option toenvelope.list.page-size
. - Moved
email-listing-datetime-fmt
config option toenvelope.list.datetime-fmt
. - Moved
email-listing-datetime-local-tz
config option toenvelope.list.datetime-local-tz
. - Moved
email-reading-headers
config option tomessage.read.headers
. - Moved
email-reading-format
config option tomessage.read.format
. - Moved
email-writing-headers
config option tomessage.write.headers
. - Move
email-sending-save-copy
config option tomessage.send.save-copy
. - Move
email-hooks.pre-send
config option tomessage.send.pre-hook
. - Moved
sync
config option tosync.enable
. - Moved
sync-dir
config option tosync.dir
. - Moved
sync-folders-strategy
config option tosync.strategy
. - Moved
maildir-*
config options tomaildir.*
. - Moved
imap-*
config options toimap.*
. - Moved
notmuch-*
config options tonotmuch.*
. - Moved
sendmail-*
config options tosendmail.*
. - Moved
smtp-*
config options tosmtp.*
. - Replaced options
imap-ssl
,imap-starttls
andimap-insecure
byimap.encryption
:imap.encryption = "tls" | true
: use required encryption (SSL/TLS)imap.encryption = "start-tls"
: use opportunistic encryption (StartTLS)imap.encryption = "none" | false
: do not use any encryption
- Replaced options
smtp-ssl
,smtp-starttls
andsmtp-insecure
bysmtp.encryption
:smtp.encryption = "tls" | true
: use required encryption (SSL/TLS)smtp.encryption = "start-tls"
: use opportunistic encryption (StartTLS)smtp.encryption = "none" | false
: do not use any encryption
Removed
- Disabled temporarily the
notmuch
backend because it needs to be refactored using the backend features system (it should be reimplemented soon). - Disabled temporarily the
search
andsort
command because they need to be refactored, see #39. - Removed the
notify
command (replaced by the newwatch
command). - Removed all global options except for
display-name
,signature
,signature-delim
anddownloads-dir
.
See config.sample.toml for a documented configuration example with the new API.