Commit graph

7 commits

Author SHA1 Message Date
Peter Wang
ee3ccccd25 cli: refactor insert
Change insert_message into write_message and move its responsibilities
for indexing the message into the main function, to simplify the control
flow.
2014-09-16 20:18:50 +02:00
Jani Nikula
e8ec38c25a cli: make sure notmuch new and insert don't add invalid tags
Check new.tags configuration values before doing anything, and bail
out on invalid values.
2014-03-06 07:42:10 -04:00
Jani Nikula
c745377306 cli: clean up exit status code returned by the cli commands
Apart from the status codes for format mismatches, the non-zero exit
status codes have been arbitrary. Make the cli consistently return
either EXIT_SUCCESS or EXIT_FAILURE.
2014-01-18 14:45:26 -04:00
Jani Nikula
58dfc87721 insert: respect maildir.synchronize_flags
Don't synchronize maildir flags if the user doesn't want it.
2014-01-03 07:13:00 -04:00
Peter Wang
426558d37e insert: add --create-folder option
Allow the insert command to create the maildir folder
into which the new message should be delivered.
2013-07-04 00:05:11 -03:00
Peter Wang
51590d0f27 insert: add --folder option
Allow the new message to be inserted into a folder within the Maildir
hierarchy instead of the top-level folder.
2013-07-01 12:22:48 -03:00
Peter Wang
9439a1ec0c cli: add insert command
The notmuch insert command reads a message from standard input,
writes it to a Maildir folder, and then incorporates the message into
the notmuch database.  Essentially it moves the functionality of
notmuch-deliver into notmuch.

Though it could be used as an alternative to notmuch new, the reason
I want this is to allow my notmuch frontend to add postponed or sent
messages to the mail store and notmuch database, without resorting to
another tool (e.g. notmuch-deliver) nor directly modifying the maildir.
2013-06-29 14:42:20 -03:00