unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* exim config for 'notmuch insert' retry
@ 2014-12-16 11:31 Edward Betts
  0 siblings, 0 replies; only message in thread
From: Edward Betts @ 2014-12-16 11:31 UTC (permalink / raw)
  To: notmuch

Short version: exim has an option to retry delivery when notmuch insert fails

Long version:

I'm using maildrop and 'notmuch insert' to sort and tag my incoming mail.
Sometimes 'notmuch insert' isn't able to write to the notmuch index because
another process is holding the notmuch write lock. At first when this happened
exim would just bounce the message.

I could use the '--keep' option so 'notmuch insert' would write the message to
the maildir, but not index it. It would later be picked up by running 'notmuch
new' from cron. The problem is that the initial tagging is defined in the
maildrop config. I would need to specify my tagging rules in two different
places.

For me, a better approach would be if the undeliverable message could be added
to a queue, ready for another delivery attempt. I realised that this is exactly
what an MTA like exim is designed to do. I added the 'temp_errors = 1' option
to the maildrop pipe transport, this tells exim that delivery errors are
temporary and it should retry failed deliveries.

I'm sharing this information in case other people find it useful.

Here is the complete maildrop pipe transport from my exim4.conf:

maildrop_pipe:
  driver = pipe
  path = "/bin:/usr/bin:/usr/local/bin"
  command = "/usr/bin/maildrop"
  temp_errors = 1
  message_prefix =
  message_suffix =
  log_defer_output = true
  return_path_add
  delivery_date_add
  envelope_to_add

-- 
Edward.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-16 11:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 11:31 exim config for 'notmuch insert' retry Edward Betts

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).