[Dovecot] writing an MDA, help me avoid corrupted indexes

Curtis Maloney cmaloney at cardgate.net
Wed Dec 14 07:03:26 EET 2005


Lee Howard wrote:
> Hello.
> 
> I could conceivably use procmail to do that MDA, and I've done similar 
> things with procmail in the past, but my growing experience with 
> procmail indicates that procmail is too ferocious for what simple work I 
> need done, and too difficult to make work right in a virtual-user 
> environment.  So I've written my own little MDA with a few lines of 
> shell that will take the mail from Postfix+SpamAssassin and ultimately 
> deposit mails in the maildirs.

Have you checked out Dovecot's own LDA?  It includes index updating as, really, 
its primary purpose, but also Sieve filtering.  If you just want the LDA to 
filter on headers set by your spam/virus scanners, it's ample.

> So far so good, except that I keep seeing corrupt indexes... probably 
> because I'm not touching the indexes at all with the MDA.  My guess is 
> that in order for the MDA to properly deal with maildir it needs to 
> adjust the indexes after depositing new mail.  Okay.  So can someone 
> either give me a pointer to the proper documentation on this, including 
> the index file formats, or perhaps just explain it to me?  Maybe I'm 
> missing a larger picture of maildir handling?
> 

My understanding was that Dovecot fixes corrupt indexes as a matter of course, 
and isn't too bothered with it.  What level do you have your logging set to?

Do you, by chance, have your mail partition mounted 'noatime'?

> I've glanced through http://www.dovecot.org/doc/index.txt but I notice 
> that the index files are not ASCII, so I'm not sure where to start at 
> understanding that documentation.
> 
> Any and all help would be appreciated.

As a further note, have you checked out the patches that allow Postfix to use 
the Dovecot auth daemon, so you can have SMTP AUTH without resorting to the 
horror that is Cyrus SASL?

--
Curtis Maloney
cmaloney at cardgate.net


More information about the dovecot mailing list