[Dovecot] config file parsing, tab characters
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@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@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:
Is there someway to check the validity of the dovecot.conf file. I notice dovecot -n does not print the entire config.
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.
- 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.
- 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()
participants (2)
-
John Hannfield
-
Timo Sirainen