With exim4 and notmuch, should .Archive be a file or a folder?

0

0

I'm following The Hacker's Replacement for Gmail, using (as suggested) Debian 7 on a VPS.

If I configure it for "normal" IMAP I can successfully receive email into INBOX. So I'm doing something right. However the idea here is instead to put the mail in an Archive folder, then use notmuch to tag and maybe move to an Important folder.

The author says to make a ~/.forward file like this:

# Exim filter

save Maildir/.Archive

explaining:

What this does is put all mail that is recieved into the Archive subdirectory (the dots are convention of the version of the Maildir format that Courier-IMAP uses).

If I follow these instructions exactly, then Exim4 creates a Maildir/.Archive file and keeps appending the messages to it. But then notmuch doesn't find them.

I thought perhaps the author omitted that I need to use makemaildir to create a Maildir/.Archive directory. So I tried that, but then Exim4 doesn't store the messages. Instead var/log/exim4/mainlog has entries like this:

2013-07-07 21:54:42 1Uvwuo-0007CH-5m == /home/i/Maildir/.Archive <i@domain.com> R=userforward T=address_file defer (-4): mailbox /home/i/Maildir/.Archive has too many links (5)

Maybe I'm being dense, but I don't understand what "too many links" means in this regard.

I've been going in circles for many hours and seem completely stuck. Maybe learning about Maildir++, Exim, Courier, and notmuch all at once is too much. Can anyone please point me in the right direction?

p.s. I would have tagged this notmuch, too, but I lack rep.

Greg Hendershott

Posted 2013-07-07T22:16:40.227

Reputation: 277

Answers

3

Tail / is important here. If you want Maildir delivery then you must use:

# Exim filter

save Maildir/.Archive/

dsznajder

Posted 2013-07-07T22:16:40.227

Reputation: 216

Using relative path results in "appendfile: file or directory name "..." is not absolute", but using absolute paths works. @dsznajder is there some Exim4 setting that you enabled to allow relative paths? – Daniel Sokolowski – 2016-02-15T04:42:08.500

If you don't have / it treats it as a normal alias hence it's needed, see file /etc/exim4/conf.d/transport/35_exim4-config_address_directory comments on Debian split config system. – Daniel Sokolowski – 2016-02-15T14:30:15.143

@DanielSokolowski - Maybe you need to set transport_home_directory in router to "home" of virtual user. – dsznajder – 2016-02-15T14:45:55.960

2

Best guess is that exim is trying to deliver to an mbox (which is a single file), not maildir. If you run dpkg-reconfigure exim4-config and run through, do you have it set to use Maildir?

Note that this will also explain why notmuch is confused, as it only deals with Maildir.

Daniel Patterson

Posted 2013-07-07T22:16:40.227

Reputation: 21

I double-checked and it is set to use Maildir. Also, if I delete the .forward file and let mail be delivered "normally", it ends up in INBOX and notmuch does see it, as well as messages in Sent from doing test sends via IMAP from Thunderbird. The problem I'm having is with following the instructions to have new mail delivered to an Archive folder, instead. – Greg Hendershott – 2013-07-08T20:47:39.613