Adrian Pepper
2010-Apr-14 17:25 UTC
[Dovecot] version 1.2.11 creating symlink loop for config file
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 at 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 at 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.
Timo Sirainen
2010-Apr-14 17:33 UTC
[Dovecot] version 1.2.11 creating symlink loop for config file
On Wed, 2010-04-14 at 13:25 -0400, Adrian Pepper wrote:> 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/base_dir really isn't meant to be under etc/. Why did you think of putting it there? Maybe the symlink loop is the only problem currently, but I can't promise other things won't break in future. The base_dir should point to somewhere that doesn't contain any other files, so Dovecot should be free to delete all files under it if it so chooses. Dovecot also doesn't need any files to permanently exist there, the whole directory could be deleted every time before startup. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20100414/4de368ec/attachment-0002.bin>
Apparently Analagous Threads
- puppet class and user groups question
- Dovecot Maildir ownership/permission problem
- RE: [Xen-ia64-devel] New error trying to create a domain(usinglatestxend-unstable
- dovecot2 Beta2: different certs for imaps and pop3s
- auth: Error: BUG: Authentication client sent unknown handshake command