On Tue, 2014-05-27 at 16:31 -0700, Joseph Tam wrote:
Arthur Dent <arthurdent.london@gmail.com> writes:
I get my mail from a variety of ISP and online email accounts using fetchmail. I guess there's no change needed there?
That feeds into procmail. I think I will have to change the mail procmail configuration file and ALL my procmail recipe rc files (I have many) - which filter into several different mboxs?
As others have intimated, the use of procmail as your LDA is causing your mailbox to become inconsistent with respect to your indices. Procmail is appending your messages to mailboxes, but is ignorant of the existence of dovecot indices, and does not update them. When your IMAP service access those mailboxes, it detects this condition, and that's the log messages you are seeing.
I think those messages are benign -- you can probably ignore it. Dovecot will automatically rebuild them.
The alternative is to let dovecot's be responsible for message delivery: it can then update the indices, and IMAP/POP will find consistent indices.
Try this at the end of procmailrc for regular delivery to the INBOX
################################################################################ # Replace default action using dovecot-lda to maintains caches. ################################################################################ :0 w | /location/of/dovecot-lda -d $USER
For for non-INBOX filtering, try something like
:0 Hw *^Subject: TEST |/location/of/dovecot-lda -d $USER -m testbox
Thanks Joseph - this is really useful.
By coincidence (whilst researching all of this) last night I cam across this page: http://wiki2.dovecot.org/procmail which says exactly what you suggested. I tried it as an experiment on just one of my mailing list recipes. It didn't work and dropped through to my default inbox. This is what I have:
:0 w
- ^List-Id:.*users.lists.fedoraproject.org | $DELIVER -m $DESTDIR/MLists/Fedora
where: DELIVER=/usr/libexec/dovecot/deliver DESTDIR=/home/mark/mail/ are defined in a the main procmailrc
This is what I found in the procmail log: lda: Fatal: destination user parameter (-d user) not given procmail: Program failure (64) of "/usr/libexec/dovecot/deliver" procmail: Couldn't determine implicit lockfile from "spamc"
From users-bounces@lists.fedoraproject.org Wed May 28 01:39:03 2014 Subject: Five Things in Fedora This Week (2014-05-27)
Why did this mail not get delivered to /home/mark/mail/MLists/Fedora?
Thanks again
Mark