[Dovecot] Dovecot deliver logging problem and procmail

Gerhard Wiesinger lists at wiesinger.com
Mon Jul 3 23:07:27 EEST 2006


Ok, I got it finally to work with the following config:
protocol lda {
   auth_socket_path = /var/run/dovecot-auth-master
   postmaster_address = postmaster at domain
   log_path = /home/user/deliver.log
   info_log_path = /home/user/deliver.log
   log_timestamp=%Y.%m.%d %H:%M:%S%t
   default_mail_env = mbox:~/Mail:INBOX=/var/mail/%u
}

I've a first version with procmail now running:
When it delivers to a mbox folder it doesn't write directly to the 
mbox but it delivers through dovecots deliver agent.
(BTW: procmail is really ugly code, I'll release the code change for 
review when I have cleaned up a little bit).

As far as I saw dovecot's deliver process updates some header fields and 
the index files:
Status:
X-Keywords: (with a lot of spaces, why?)
Content-Length: 6

After access with dovecot the following header fields change:
Status: O
X-IMAPbase: 115195111 0000000009
X-UID: 2

So basically this isn't an advantage over the procmail or any other 
delivering process top mbox. The problem is that after the first access 
the X-UID and X-IMAPbase header must be added, so on large mbox files this 
might take a long time.

So basically dovecot's deliver could add these two lines, correct?
This would speedup mboxes a lot with new content.

Ciao,
Gerhard

On Sun, 2 Jul 2006, Timo Sirainen wrote:

> On Jul 2, 2006, at 12:31 PM, Gerhard Wiesinger wrote:
>
>> For testing I use the commands discussed below. Currently I'm having a 
>> problem that deliver doesn't recognize the logging configuration from the 
>> environment (as non root user):
>> setenv INFO_LOG_PATH $HOME/deliver.log
>> setenv LOG_PATH $HOME/deliver.log
>> setenv LOG_TIMESTAMP "%b %d %H:%M:%S "
>> 
>> cat testmail.txt | /usr/libexec/dovecot/deliver -m testbox
>
> The environment variables are all just cleared before reading dovecot.conf. 
> You could try putting them inside protocol lda section. I'm not sure if 
> %h/deliver.log would work as a path, plain "deliver.log" might do the same.
>
>


More information about the dovecot mailing list