What is the following at the end of "main_init" in dovecot 1.2.11 (src/master/main.c) intended to accomplish?
base_config_path = t_strconcat(settings_root->defaults->base_dir,
"/"PACKAGE".conf", NULL);
(void)unlink(base_config_path);
if (symlink(configfile, base_config_path) < 0) {
i_error("symlink(%s, %s) failed: %m",
configfile, base_config_path);
}
}
With our compilation parameters and runtime setup it ends up removing the working base_config_path file and making it instead a symlink to itself. (I.e. a non-working loop). Strangely, the one instance of dovecot continues and seems to mostly work. But (for now) I need to put back the proper dovecot.conf before I can restart it.
I think that would be the expected result if strcmp(configfile, base_config_path) == 0. Is that in fact not expected to be the case? (See my initial question).
I did not expect self-modifying of configuration like this. (See my initial question).
Pattern matches (e.g. "config_path") find no apparent mention of this in recent postings.
Adrian Pepper Computer Science Computing Facility David R. Cheriton School of Computer Science University of Waterloo arpepper@uwaterloo.ca
After the bug has happened... services110.cs# servers/dovecot -n
1.2.11: /software/imap-dovecot-1.2/data/etc/dovecot/dovecot.conf
Error: Can't open configuration file /software/imap-dovecot-1.2/data/etc/dovecot/dovecot.conf: Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS Fatal: Invalid configuration in /software/imap-dovecot-1.2/data/etc/dovecot/dovecot.conf services110.cs#
services110.cs# servers/dovecot -n
1.2.11: /software/imap-dovecot-1.2/data/etc/dovecot/dovecot.conf
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 768). Either grow the limit or change login_max_processes_count and max_mail_processes settings
OS: SunOS 5.8 sun4u
base_dir: /software/imap-dovecot-1.2/data/etc/dovecot/ protocols: imap imaps pop3 pop3s ssl_cert_file: /software/sslCerts/config/certs/dovecot.pem ssl_key_file: /software/sslCerts/config/certs/private/dovecot.key disable_plaintext_auth: no login_dir: /software/imap-dovecot-1.2/data/etc/dovecot/home/ login_executable(default): /software/imap-dovecot-1.2/libexec/dovecot/imap-login login_executable(imap): /software/imap-dovecot-1.2/libexec/dovecot/imap-login login_executable(pop3): /software/imap-dovecot-1.2/libexec/dovecot/pop3-login first_valid_uid: 100 last_valid_uid: 65535 first_valid_gid: 100 last_valid_gid: 65535 mail_location: mbox:~:INDEX=~/.imap:INBOX=/var/mail/%u mmap_disable: yes dotlock_use_excl: no mail_nfs_storage: yes mail_nfs_index: yes mail_executable(default): /software/imap-dovecot-1.2/libexec/dovecot/imap mail_executable(imap): /software/imap-dovecot-1.2/libexec/dovecot/imap mail_executable(pop3): /software/imap-dovecot-1.2/libexec/dovecot/pop3 mail_plugin_dir(default): /software/imap-dovecot-1.2/lib/dovecot/imap mail_plugin_dir(imap): /software/imap-dovecot-1.2/lib/dovecot/imap mail_plugin_dir(pop3): /software/imap-dovecot-1.2/lib/dovecot/pop3 namespace: type: private separator: / prefix: maildir_mail/ location: maildir:~/.maildir list: yes subscriptions: yes namespace: type: private separator: / location: mbox:~/.:INBOX=/var/mail/%u:INDEX=~/.imap1 inbox: yes list: yes subscriptions: yes namespace: type: private separator: / prefix: mail/ location: mbox:~/mail:INDEX=~/.imap2 list: yes subscriptions: yes lda: postmaster_address: postmaster@cs.uwaterloo.ca hostname: cs.uwaterloo.ca auth default: verbose: yes debug: yes passdb: driver: passwd-file args: /etc/shadow userdb: driver: passwd args: blocking=yes services110.cs#
This is not a production setup; some/most configuration is experimental or speculative.
"dovecot -n" does not appear to remove the config file.