[Dovecot] Upgrade Too 1.2.11 Broke Everything
Good Day.
I have had dovecot working successfully for years now, however after a system update , dovecot refused to start up complaing that im not using absolute paths. It took a bit of hacking to get it working again as can be seen by the sql query, however now imap doesn't work anymore because of that change. Im lost!!
dovecot --version 1.2.11
dovecot -n # 1.2.11: /usr/local/etc/dovecot.conf # OS: FreeBSD 8.1-PRERELEASE amd64 protocols: imap pop3 listen(default): * listen(imap): * listen(pop3): *:110 ssl: no disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_greeting: thavinci Ready verbose_proctitle: yes first_valid_uid: 125 first_valid_gid: 125 mail_access_groups: postfix mail_privileged_group: postfix mail_location: mbox:~:INBOX=/var/mail/%u mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh lda: postmaster_address: postmaster@example.com sendmail_path: /usr/sbin/sendmail auth default: passdb: driver: sql args: /usr/local/etc/dovecot-mysql.conf passdb: driver: sql args: /usr/local/etc/dovecot-mysql.conf userdb: driver: sql args: /usr/local/etc/dovecot-mysql.conf userdb: driver: sql args: /usr/local/etc/dovecot-mysql.conf
In regards to this file the following was changed to make it work...
mail_location = mbox:~:INBOX=/var/mail/%u
Used to be:
mail_location = mbox:~/mail/:INBOX=/var/mail/%u
grep -v '^ *\(#.*\)\?$' dovecot-mysql.conf driver = mysql default_pass_scheme = CRYPT connect = host=xx.xx.xx.xx dbname=nameofdb user=dbuser password=dbpassword password_query = SELECT password FROM mailbox WHERE username = '%u' AND active = '1' user_query = SELECT maildir, concat('/var/mail/',maildir) AS home, 125 AS uid, 125 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
This query used to be:
user_query = SELECT maildir, maildir AS home, 125 AS uid, 125 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
A snapshot of the maillog during failure
Jun 29 11:50:15 thavinci postfix/qmgr[1469]: BA3DD9B4C9: removed Jun 29 11:50:49 thavinci dovecot: imap-login: Login: user=<me@thavinci.za.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Jun 29 11:50:49 thavinci dovecot: IMAP(me@thavinci.za.net): Connection closed bytes=53/372 Jun 29 11:52:05 thavinci dovecot: imap-login: Login: user=<me@thavinci.za.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Jun 29 11:52:05 thavinci dovecot: IMAP(me@thavinci.za.net): Connection closed bytes=53/372 Jun 29 11:52:05 thavinci dovecot: imap-login: Login: user=<me@thavinci.za.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Jun 29 11:52:05 thavinci dovecot: IMAP(me@thavinci.za.net): stat(/var/mail/me@thavinci.za.net/.imap/INBOX) failed: Not a directory Jun 29 11:52:05 thavinci last message repeated 2 times Jun 29 11:52:05 thavinci dovecot: IMAP(me@thavinci.za.net): open() failed with subscription file /var/mail/me@thavinci.za.net/.subscriptions: Not a directory Jun 29 11:52:05 thavinci dovecot: IMAP(me@thavinci.za.net): Connection closed bytes=306/4046
As can be seen somehow it's trying to write to the mbox file and I have no idea why!
And this is the db structure!
SET FOREIGN_KEY_CHECKS=0;
-- Table structure for mailbox_copy
DROP TABLE IF EXISTS mailbox_copy
;
CREATE TABLE mailbox_copy
(
username
varchar(255) NOT NULL DEFAULT '',
password
varchar(255) NOT NULL DEFAULT '',
name
varchar(255) NOT NULL DEFAULT '',
maildir
varchar(255) NOT NULL DEFAULT '',
quota
int(10) NOT NULL DEFAULT '0',
domain
varchar(255) NOT NULL DEFAULT '',
created
datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
modified
datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
active
tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (username
),
KEY username
(username
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual
Mailboxes';
-- Records of mailbox_copy
On 2010-06-29 6:11 AM, Marcel Grandemange wrote:
I have had dovecot working successfully for years now, however after a system update , dovecot refused to start up complaing that im not using absolute paths.
What version were you upgrading from?
--
Best regards,
Charles
participants (2)
-
Charles Marcus
-
Marcel Grandemange