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 <[email protected]> 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.

2 Answers 2

3

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

# Exim filter

save Maildir/.Archive/
3
  • 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? Feb 15, 2016 at 4:42
  • 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. Feb 15, 2016 at 14:30
  • @DanielSokolowski - Maybe you need to set transport_home_directory in router to "home" of virtual user.
    – dsznajder
    Feb 15, 2016 at 14:45
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.

1
  • 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. Jul 8, 2013 at 20:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .