Hello, I am using the latest dovecot 1.1.2 with postfix, and using doveco deliver command for LDA. I really love dovecot, and how it has progressed over the years. However I have noticed that if I put a TAB character in the dovecot.conf file, it sometimes does not parse the file correctlty, and complains about missing postmaster_address etc, even though they are there. So I reformated my config file, with just spaces, no tabs. I am very careful about that now. However I still seem to have a problem in some places with spaces. For example, in the LDA section: If I have 3 or 4 spaces, after the lda line in the definition, like so: #----------------------------------------------------------------------------- # LDA Settings #----------------------------------------------------------------------------- protocol lda { postmaster_address = postmaster at mydomain.com hostname = mydomain.com .... it does not work. I must have only 1 space between the end of lda and the curly bracket. Like this: #----------------------------------------------------------------------------- # LDA Settings #----------------------------------------------------------------------------- protocol lda { postmaster_address = postmaster at mydomain.com hostname = mydomain.com .... This seems very flaky. I am not certain I will always be able to check the file when making changes. So my question is: 1. Is there someway to check the validity of the dovecot.conf file. I notice dovecot -n does not print the entire config. 2. Is there any chance the code used to parse the config file, could be updated to be more robust, and to include support for tabs? Thank you. Paul
On Wed, 2008-08-20 at 17:33 +0100, John Hannfield wrote:> I am using the latest dovecot 1.1.2 with postfix, and using doveco > deliver command for LDA. > I really love dovecot, and how it has progressed over the years. > However I have noticed that > if I put a TAB character in the dovecot.conf file, it sometimes does > not parse the file correctlty, > and complains about missing postmaster_address etc, even though they are there.Yes, deliver's config file parser uses separate code from the rest of Dovecot. There have been a lot of bugs in it and I really hate that code. I do have plans to fix this by moving all the config parsing to a single config binary, but I don't know yet if it's going to be for v1.2, v1.3 or v2.0. So for now just try to avoid tabs.> 1. Is there someway to check the validity of the dovecot.conf file. > I notice dovecot -n does not print the entire config.dovecot -n verifies the validity of the dovecot.conf, but since deliver uses separate code with its own bugs it doesn't really help.> 2. Is there any chance the code used to parse the config file, could > be updated to be more robust, and to include support for tabs?I don't really want to touch that code before the rewrite, but feel free to send a patch. src/deliver/deliver.c function config_file_init() -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080821/27583e82/attachment-0002.bin>