--- dovecot-1.0.5.orig/debian/tests/testlib.py +++ dovecot-1.0.5/debian/tests/testlib.py @@ -0,0 +1,101 @@ +'''Common classes and functions for package tests.''' + +import string, random, crypt, subprocess, pwd, signal, time + +class TimedOutException(Exception): + def __init__(self, value = "Timed Out"): + self.value = value + def __str__(self): + return repr(self.value) + +def timeout(secs, f, *args): + def handler(signum, frame): + raise TimedOutException() + + old = signal.signal(signal.SIGALRM, handler) + result = None + signal.alarm(secs) + try: + result = f(*args) + finally: + signal.alarm(0) + signal.signal(signal.SIGALRM, old) + + return result + +def random_string(length): + '''Return a random string, consisting of ASCII letters, with given + length.''' + + s = '' + maxind = len(string.letters)-1 + for l in range(length): + s += string.letters[random.randint(0, maxind)] + return s + +def login_exists(login): + '''Checks whether the given login exists on the system.''' + + try: + pwd.getpwnam(login) + return True + except KeyError: + return False + +def cmd(command, input = None, stderr = subprocess.STDOUT): + '''Try to execute given command (array) and return its stdout, or return + a textual error if it failed.''' + + try: + sp = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) + except OSError, e: + return [127, str(e)] + + out = sp.communicate(input)[0] + return [sp.returncode,out] + +class TestUser: + '''Create a temporary test user and remove it again in the dtor.''' + + def __init__(self, login=None, home=True): + '''Create a new user account with a random password. + + By default, the login name is random, too, but can be explicitly + specified with 'login'. By default, a home directory is created, this + can be suppressed with 'home=False'.''' + + self.login = None + + if login: + if login_exists(login): + raise ValueError, 'login name already exists' + else: + while(True): + login = random_string(8) + if not login_exists(login): + break + + self.salt = random_string(2) + self.password = random_string(8) + self.crypted = crypt.crypt(self.password, self.salt) + + if home: + assert subprocess.call(['useradd', '-p', self.crypted, '-m', login]) == 0 + else: + assert subprocess.call(['useradd', '-p', self.crypted, login]) == 0 + + self.login = login + p = pwd.getpwnam(self.login) + self.uid = p[2] + self.gid = p[3] + + def __del__(self): + '''Remove the created user account.''' + + if self.login: + # seems to already have gone here + try: + import subprocess + except: + pass + assert subprocess.call(['userdel', '-r', self.login]) == 0 --- dovecot-1.0.5.orig/debian/tests/general +++ dovecot-1.0.5/debian/tests/general @@ -0,0 +1,210 @@ +#!/usr/bin/python + +import unittest, subprocess, shutil, grp, os, os.path, sys, time +import imaplib, poplib + +import testlib +import testlib_dovecot + +class DovecotBasics(unittest.TestCase): + '''Base operational tests for Dovecot server.''' + + def _setUp(self,config_mmap_disable=False): + '''Create test scenario. + + dovecot is configured for all protocols (imap[s] and pop3[s]), a test + user is set up, and /var/mail/$user contains an unread and a read mail. + ''' + + self.user = testlib.TestUser() + + config = ''' +protocols = imap imaps pop3 pop3s +log_timestamp = "%Y-%m-%d %H:%M:%S " +mail_extra_groups = mail +''' + if config_mmap_disable: + config += ''' +mmap_disable = yes +''' + config += ''' +protocol imap { +} +protocol pop3 { + pop3_uidl_format = %08Xu%08Xv +} +auth default { + mechanisms = plain + passdb pam { + } + userdb passwd { + } + user = root +} +''' + self.dovecot = testlib_dovecot.Dovecot(self.user,config) + + def tearDown(self): + self.dovecot = None + self.user = None + + def _test_pop3_proto(self, pop): + '''Internal factorization of POP3 protocol checks with an established + connection.''' + + # check empty password + self.assertEqual(pop.user(self.user.login), '+OK') + self.assertRaises(poplib.error_proto, pop.pass_, '') + + # check wrong password + self.assertEqual(pop.user(self.user.login), '+OK') + self.assertRaises(poplib.error_proto, pop.pass_, '123') + + # check correct password + self.assertEqual(pop.user(self.user.login), '+OK') + self.assertEqual(pop.pass_(self.user.password), '+OK Logged in.') + + # check messages + self.assertEqual(pop.stat()[0], 2, '2 available messages') + self.assertEqual(pop.list()[1], ['1 163', '2 161']) + self.assertEqual('\n'.join(pop.retr(1)[1]), '''Date: Thu, 16 Nov 2006 17:12:23 -0800 +From: Test User 1 +To: Dovecot tester +Subject: Test 1 + +Some really important news.''') + self.assertEqual('\n'.join(pop.retr(2)[1]), '''Date: Tue, 28 Nov 2006 11:29:34 +0100 +From: Test User 2 +To: Dovecot tester +Subject: Test 2 + +More news. + +Get cracking!''') + + self.assertEqual(pop.quit(), '+OK Logging out.') + + # check new status + status = '' + for l in open(self.dovecot.get_mailbox()): + if l.startswith('Status:'): + status += l + self.assertEqual(status, 'Status: NRO\nStatus: RO\n') + + def test_pop3(self): + '''Test POP3 protocol.''' + + pop = poplib.POP3('localhost') + self.assertEqual(pop.getwelcome(), '+OK Dovecot ready.') + + self._test_pop3_proto(pop) + + def test_pop3s(self): + '''Test POP3S protocol.''' + + pop = poplib.POP3_SSL('localhost') + self.assertEqual(pop.getwelcome(), '+OK Dovecot ready.') + + self._test_pop3_proto(pop) + + def _test_imap_proto(self, imap): + '''Internal factorization of IMAP4 protocol checks with an established + connection.''' + + # invalid passwords + self.assertRaises(imaplib.IMAP4.error, imap.login, self.user.login, '') + self.assertRaises(imaplib.IMAP4.error, imap.login, self.user.login, '123') + + # correct password + imap.login(self.user.login, self.user.password) + + # list mailboxes + status, list = imap.list() + self.assertEqual(status, 'OK') + self.assert_(list[0].endswith('"INBOX"')) + + # check mails + imap.select() + self.assertEqual(imap.search(None, 'ALL'), ('OK', ['1 2'])) + self.assertEqual(imap.fetch('1', '(FLAGS)'), + ('OK', ['1 (FLAGS (\\Recent))'])) + self.assertEqual(imap.fetch('2', '(FLAGS)'), + ('OK', ['2 (FLAGS (\\Seen \\Recent))'])) + self.assertEqual(imap.fetch('1', '(BODY[TEXT])')[1][0][1], + 'Some really important news.\r\n') + self.assertEqual(imap.fetch('2', '(BODY[TEXT])')[1][0][1], + 'More news.\r\n\r\nGet cracking!') + + self.assertEqual(imap.fetch('1', '(RFC822)')[1], + [('1 (RFC822 {163}', + '''Date: Thu, 16 Nov 2006 17:12:23 -0800\r +From: Test User 1 \r +To: Dovecot tester \r +Subject: Test 1\r +\r +Some really important news.\r +'''), ')']) + + # delete mail 1 + self.assertEqual(imap.store('1', '+FLAGS', '\\Deleted')[0], 'OK') + self.assertEqual(imap.expunge()[0], 'OK') + self.assertEqual(imap.search(None, 'ALL'), ('OK', ['1'])) + + # old mail 2 is mail 1 now + self.assertEqual(imap.fetch('1', '(RFC822)')[1], + [('1 (RFC822 {161}', + '''Date: Tue, 28 Nov 2006 11:29:34 +0100\r +From: Test User 2 \r +To: Dovecot tester \r +Subject: Test 2\r +\r +More news.\r +\r +Get cracking!'''), ')']) + imap.close() + imap.logout() + + def test_imap(self): + '''Test IMAP4 protocol.''' + + imap = imaplib.IMAP4() + self._test_imap_proto(imap) + + def test_imaps(self): + '''Test IMAP4S protocol.''' + + imap = imaplib.IMAP4_SSL() + self._test_imap_proto(imap) + + +class DovecotMmapTest(DovecotBasics): + '''Test dovecot with mmap support.''' + + def setUp(self): + self._setUp() + + def test_configuration(self): + '''Test dovecot configuration has mmap support.''' + self.assertEquals(subprocess.call(['/bin/grep', '-q', '^mmap_disable = yes','/etc/dovecot/dovecot.conf'], stdout=subprocess.PIPE), 1) + + +class DovecotDirectTest(DovecotBasics): + '''Test dovecot without mmap support.''' + + def setUp(self): + self._setUp(config_mmap_disable=True) + + def test_configuration(self): + '''Test dovecot configuration has mmap disabled.''' + self.assertEquals(subprocess.call(['/bin/grep', '-q', '^mmap_disable = yes','/etc/dovecot/dovecot.conf'], stdout=subprocess.PIPE), 0) + + + +if __name__ == '__main__': + os.dup2(1,2) + suite = unittest.TestSuite() + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(DovecotDirectTest)) + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(DovecotMmapTest)) + unittest.TextTestRunner(verbosity=2).run(suite) + +#unittest.main() --- dovecot-1.0.5.orig/debian/tests/control +++ dovecot-1.0.5/debian/tests/control @@ -0,0 +1,4 @@ +Tests: general +Restrictions: needs-root +Features: no-build-needed +Depends: python, dovecot-imapd, dovecot-pop3d --- dovecot-1.0.5.orig/debian/tests/testlib_dovecot.py +++ dovecot-1.0.5/debian/tests/testlib_dovecot.py @@ -0,0 +1,127 @@ +#!/usr/bin/python +''' + Packages required: dovecot-imapd dovecot-pop3d +''' + +import subprocess, shutil, grp, os, os.path, sys, time + +class Dovecot: + def get_mailbox(self): + return self.mailbox + + def __init__(self,user,config=None): + '''Create test scenario. + + dovecot is configured for all protocols (imap[s] and pop3[s]), a test + user is set up, and /var/mail/$user contains an unread and a read mail. + ''' + + self.old_version = False + if config == None: + if file("/etc/dovecot/dovecot.conf","r").read().find('auth_mechanisms = plain')>0: + # Old dovecot + config=''' +protocols = imap imaps pop3 pop3s +login = imap +login = pop3 +mail_extra_groups = mail + +auth = auth-cram +auth_mechanisms = cram-md5 +auth_passdb = passwd-file /etc/dovecot/test.passwd +auth_user = root + +auth = auth-plain +auth_mechanisms = plain +auth_passdb = pam +auth_user = root + +''' + self.old_version = True + else: + # Modern dovecot + config=''' +protocols = imap imaps pop3 pop3s +log_timestamp = "%Y-%m-%d %H:%M:%S " +mail_extra_groups = mail +protocol imap { +} +protocol pop3 { + pop3_uidl_format = %08Xu%08Xv +} +auth default { + mechanisms = plain cram-md5 + passdb passwd-file { + args = /etc/dovecot/test.passwd + } + passdb pam { + } + userdb passwd { + } + user = root +} +''' + + # make sure that /etc/inetd.conf exists to avoid init script errors + self.created_inetdconf = False + if not os.path.exists('/etc/inetd.conf'): + open('/etc/inetd.conf', 'a') + self.created_inetdconf = True + + # configure and restart dovecot + if not os.path.exists('/etc/dovecot/dovecot.conf.autotest'): + shutil.copyfile('/etc/dovecot/dovecot.conf', '/etc/dovecot/dovecot.conf.autotest') + cfgfile = open('/etc/dovecot/dovecot.conf', 'w') + cfgfile.write(config) + cfgfile.close() + + file('/etc/dovecot/test.passwd','w').write('%s:{plain}%s\n' % (user.login, user.password) ) + + # restart will fail if dovecot is not already running + subprocess.call(['/etc/init.d/dovecot', 'stop'], stdout=subprocess.PIPE) + assert subprocess.call(['/etc/init.d/dovecot', 'start'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) == 0 + + # create test mailbox with one new and one old mail + self.mailbox = '/var/mail/' + user.login + self.orig_mbox = \ +'''From test1@test1.com Fri Nov 17 02:21:08 2006 +Date: Thu, 16 Nov 2006 17:12:23 -0800 +From: Test User 1 +To: Dovecot tester +Subject: Test 1 +Status: N + +Some really important news. + +From test2@test1.com Tue Nov 28 11:29:34 2006 +Date: Tue, 28 Nov 2006 11:29:34 +0100 +From: Test User 2 +To: Dovecot tester +Subject: Test 2 +Status: R + +More news. + +Get cracking! +''' + open(self.mailbox, 'w').write(self.orig_mbox) + os.chown(self.mailbox, user.uid, grp.getgrnam('mail')[2]) + os.chmod(self.mailbox, 0660) + + def __del__(self): + # restore original configuration and restart dovecot + os.rename('/etc/dovecot/dovecot.conf.autotest', '/etc/dovecot/dovecot.conf') + # quiesce, default configuration has no protocols + subprocess.call(['/etc/init.d/dovecot', 'restart'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + + if self.created_inetdconf: + os.unlink('/etc/inetd.conf') + + def get_ssl_fingerprint(self): + pem = '/etc/ssl/certs/dovecot.pem' + if not os.path.exists(pem): + pem = '/etc/ssl/certs/ssl-cert-snakeoil.pem' + + sp = subprocess.Popen(['openssl','x509','-in',pem,'-noout','-md5','-fingerprint'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) + return sp.communicate(None)[0].split('=',1)[1].strip() + --- dovecot-1.0.5.orig/debian/dovecot-common.pam +++ dovecot-1.0.5/debian/dovecot-common.pam @@ -0,0 +1,6 @@ +#%PAM-1.0 + +@include common-auth +@include common-account +@include common-session + --- dovecot-1.0.5.orig/debian/dovecot-pop3d.README.Debian +++ dovecot-1.0.5/debian/dovecot-pop3d.README.Debian @@ -0,0 +1,13 @@ +First time Installs +------------------- + +dovecot-pop3d will not actually start up until the protocols= line in +/etc/dovecot/dovecot.conf contains one or both of the keywords pop3 (for +POP3 on standard port 110) or pop3s (for POP3 over SSL on standard port 995.) + +After making the change, do: + + # invoke-rc.d dovecot restart + +to enable pop3d. + --- dovecot-1.0.5.orig/debian/dovecot-imapd.NEWS.Debian +++ dovecot-1.0.5/debian/dovecot-imapd.NEWS.Debian @@ -0,0 +1,10 @@ +dovecot (0.99.13-1) unstable; urgency=low + + * As of this version, dovecot-imapd doesn't make changes to + /etc/dovecot/dovecot.conf. If this is your first time installing the + package, read /usr/share/doc/dovecot-imapd/README.Debian to learn how + to enable the server. + + -- Jaldhar H. Vyas Fri, 31 Dec 2004 15:53:16 -0500 + + --- dovecot-1.0.5.orig/debian/dovecot-pop3d.prerm +++ dovecot-1.0.5/debian/dovecot-pop3d.prerm @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ -x "/etc/init.d/dovecot" ]; then + if [ -x /usr/sbin/invoke-rc.d ] ; then + invoke-rc.d dovecot stop + else + /etc/init.d/dovecot stop + fi +fi + +#DEBHELPER# --- dovecot-1.0.5.orig/debian/dovecot-common.NEWS.Debian +++ dovecot-1.0.5/debian/dovecot-common.NEWS.Debian @@ -0,0 +1,35 @@ +dovecot (1.0.beta3-1) unstable; urgency=low + + * Starting from this release, dovecot-lda is included in dovecot-common. + The previous executable deliver has been removed from the upstream + source package. + * Other new features recently added include + + vpopmail support + + quota support + + GSSAPI support + * All these new features mean there are some configuration file changes + please review the default /etc/dovecot/dovecot.conf and merge in any + new bits. (If you don't use any new features, your configuration should + remain compatible.) + + -- Fabio Tranchitella Fri, 17 Feb 2006 17:05:37 +0000 + +dovecot (1.0.alpha4-1) unstable; urgency=low + + * This is the 1.0alpha branch. Once again there have been incompatible + changes to the syntax of /etc/dovecot/dovecot.conf. + * The dovecot-common package now includes the zlib plugin for compressed + mboxen. Make sure you have mail_use_modules=yes in imap and/or pop3 + section in /etc/dovecot/dovecot.conf if you want to use this. + + -- Jaldhar H. Vyas Wed, 20 Jul 2005 06:30:37 -0400 + +dovecot (0.99.20050712-1) unstable; urgency=low + + * This is the 1.0stable development branch. There have been major + changes and new features have been added so check your configuration + carefully. In particular, /etc/dovecot/dovecot-mysql.conf and + /etc/dovecot/dovecot-pgsql.conf have been replaced by + /etc/dovecot/dovecot-sql.conf . + + -- Jaldhar H. Vyas Wed, 20 Jul 2005 06:30:37 -0400 --- dovecot-1.0.5.orig/debian/maildirmake.dovecot +++ dovecot-1.0.5/debian/maildirmake.dovecot @@ -0,0 +1,28 @@ +#!/bin/sh +# +# maildirmake.dovecot -- create maildirs +# Copyright (c) 2003, Jaldhar H. Vyas +# "Do what thou wilt" shall be the whole of the license. +# +dir="$1" +owner="$2" +if [ -z "$dir" ]; then + echo "Must supply a directory path" + exit 1 +fi + +if [ "$dir" = "-h" ]; then + echo "usage: $0 directory [user]" + exit 0 +fi + +umask 077 +mkdir -p "$dir/cur" "$dir/new" "$dir/tmp" || exit 1 +chmod 0700 "$dir" "$dir/cur" "$dir/new" "$dir/tmp" || exit 1 + +if [ -n "$owner" ]; then + chown -R "$owner" "$dir" || exit 1 +fi + +exit 0 + --- dovecot-1.0.5.orig/debian/dovecot-common.dirs +++ dovecot-1.0.5/debian/dovecot-common.dirs @@ -0,0 +1,8 @@ +etc +etc/ssl/certs +etc/ssl/private +usr/sbin +usr/share/dovecot +usr/share/lintian/overrides +var/run/dovecot +var/run/dovecot/login --- dovecot-1.0.5.orig/debian/dovecot-common.README.Debian +++ dovecot-1.0.5/debian/dovecot-common.README.Debian @@ -0,0 +1,496 @@ +Package configuration options +----------------------------- + +The following options were used when configuring dovecot: + + * LDAP support + * MySQL support + * Postgresql support + * OpenSSL as the SSL library + * Included dovecot-lda (please check the following url for documentation: + http://wiki.dovecot.org/LDA#head-09168e12c3cecac1f48551245bde0dd07663429f) + + +(Extracted from: http://wiki.dovecot.org/) + +Where is dovecot-example.conf? +------------------------------ +This file is mentioned in the documentation. Where is it? In this Debian +package it is used as the default configuration file /etc/dovecot/dovecot.conf + + +Configuring Dovecot or where do i store my mails? +------------------------------------------------- + +In /etc/dovecot/dovecot.conf, the default mail location is set using the +mail_location setting. This is the new setting which replaces the old +default_mail_env from earlier versions. You can use some variables in the value: + +%u - full username +%n - user part in user@domain, same as %u if there's no domain +%d - domain part in user@domain, empty if there's no domain +%h - home directory + + +Typically with maildir this would be set to: + +mail_location = maildir:~/Maildir + +or with mbox: + +mail_location = mbox:~/mail:INBOX=/var/mail/%u + +Index files are by default stored under the same directory as mails. +With maildir they are stored in the actual maildirs, with mbox they are +stored under .imap/ directory. You can change these by adding +:INDEX=location to location string. For example: + +mail_location = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=%h/indexes + +If you didn't set home directory, %h can't be used. Instead you can do +something like: + +mail_location = maildir:/home/%u/Maildir + +With virtual users the mail and home directories are probably the same. +In that case you would just do: + +mail_location = maildir:%h + + +For more details on the mail_location setting, please have a look at: +http://wiki.dovecot.org/MailLocation + + +Migrating to Dovecot or how can i recycle my mails? +------------------------------------------------------------------------------ + +1. Migration to Dovecot + +When migrating from one IMAP server to another, you should make sure +that these are preserved: Mailbox subscription list User would be able +to manually subscribe them again if you don't want to mess with it. +Message UIDs If UIDs are lost, at the minimum clients' message cache +gets cleaned Some IMAP clients store metadata by assigning it to +specific UID, if UIDs are changed these will be lost. Message flags +Lost flags can be really annoying, you most likely want to avoid it. +Here's the more server-specific instructions: + +2. UW-IMAP + +By default UW-IMAP allows access to whole home directory, and many +people have chosen to store their mails in mail/ directory. This usually +means that IMAP clients have set "IMAP namespace" to "mail/", which +doesn't work well with Dovecot, as Dovecot by default uses mail/ +directory directly. So if IMAP namespace is kept as "mail/", Dovecot +would try to access "~/mail/mail/" directory. So, removing the prefix +from IMAP clients would be the first step. Next problem is that +subscribed mailboxes are listed as "mail/box" or "~/mail/box" or +"~user/mail/box" in subscriptions file. You'd have to remove the mail/ +directory part from all of these. The subscriptions file name is also +different, UW-IMAP uses .mailboxlist while Dovecot uses .subscriptions. +Dovecot uses UW-IMAP compatible UID and message flag headers in mboxes, +so that's not a problem. + +Settings: + +mail_location = mbox:~/mail:INBOX=/var/mail/%u +# make sure mbox_locks are the same with all software that accesses your mboxes +mbox_locks = dotlock fcntl + +If you want to make a transparent migration to Dovecot without having to +change the configuration on hundreds of client systems, you will need a +slightly different configuration. If your clients have the server +prefix set to something like "~/mail", this will not work unless you +enable mail_full_filesystem_access in your Dovecot configuration. +Dovecot will otherwise reject mailbox names or prefixes that start with +"~". You can either rename your ".mailboxlist" file to ".subscriptions" +for all you users, or change the definition of SUBSCRIPTION_FILE_NAME in +src/lib-storage/subscription-file/subscription-file.c. If ~/mbox file +exists, UW-IMAP moves mails from /var/mail/user there. Currently Dovecot +doesn't support this feature, so you'll have to either move everyone's +mails to ~/mbox and reconfigure MTA/LDA to store mails there, or +alternatively get the ~/mbox users to move their mails back to +/var/mail/user. This feature may be implemented later, but it's not +planned in near future. + +3. UW-POP3 + +Dovecot generates POP3 UIDs differently than UW-IMAP. You most likely +want to preserve them, so currently you'll have to patch Dovecot +(http://dovecot.org/patches/pop3-uidl-uwimap.patch). + +4. Courier + +Courier by default uses "INBOX." as private IMAP namespace, so it has +exactly the same problems as described with UW-IMAP above. Courier's +courierimapsubscribed is compatible with Dovecot's .subscriptions file, +just rename it and remove the "INBOX." prefixes. Courier's +courierimapuiddb is compatible with Dovecot's dovecot-uidlist file, just +rename it. Courier's message flags are compatible with Dovecot (as it's +specified by Maildir specification) Courier's message keywords +implementation isn't Dovecot compatible and there's currently no easy +way to migrate them. + +Settings: + +# normal home directories +mail_location = maildir:~/Maildir +# for virtual users +mail_location = maildir:~/ + +5. Cyrus + +See cyrus2courier (http://madness.at/projects/), it's +Dovecot-compatible. Also mirrored at dovecot.org +(http://dovecot.org/tools/). + +6. Other POP3 servers + +Different POP3 servers generate UIDs differently. If you want to +preserve them to avoid users downloading their mails twice, you'll need +to figure out how the server generates the UID and patch Dovecot +accordingly to do the same. In future Dovecot will support reading the +UID from X-UIDL header, and if it doesn't exist it will use it's own +method. This feature is almost there, but not quite yet. Here is a list +of POP3 servers and how they generate their UIDs. Please update if you +know more: + +popa3d (http://www.openwall.com/popa3d/) Generates MD5 sum from a couple +of headers. Dovecot uses compatible MD5 sums internally. + + +Question and Answers +-------------------- + +1. Does Dovecot support a single user with a mixture of mail storage formats? + For example, Maildir for INBOX and unix mailbox for older archives. + +http://dovecot.org/list/dovecot/2004-August/004353.html +http://wiki.dovecot.org/MailLocation + +"It's possible with 1.0-tests by creating separate namespaces for INBOX +and others. Not possible with 0.99 though." + + +2. Do all users need to use the same format of mail storage? + +mail_location can be overridden in userdb for each user. This works +with userdbs supporting the "mail" attribute (eg. passwd-file, SQL, +LDAP). If you don't set mail_location at all, Dovecot attempts to do +automatic detection. In that case it allows either maildir in ~/Maildir +or mbox in ~/mail or ~/Mail. In future perhaps there will also be +per-user ~/.dovecotrc which allows specifying where the mails are +located. + +3. How do I setup vpopmail auth in dovecot.conf ? + +The Debian package doesn't include vpopmail support. So you will have +to rebuild it. + + * You should be sure that "./configure" found vpopmail. When finished, + configure shows a summary. You should notice that vpopmail is available + as auth module. + + * If you've compiled vpopmail whith --prefix=/var/vpopmail, + /etc/dovecot/dovecot.conf should look like: + + auth_userdb = vpopmail + auth_passdb = vpopmail + mail_location = maildir:/var/vpopmail/domains/%d/%n/Maildir + +4. How do I set the inbox-path in Pine? + +The comments in .pinerc suggest the following for reading mail on a +remote server: +inbox-path={carsen.u.washington.edu}INBOX + +Change "carsen.u.washington.edu" to whatever is appropriate for your setup. If +your IMAP server supports SSL or TLS, append "/ssl" or "/tls" to the +server name, for example "carsen.u.washington.edu/tls". Another option +is to include the username using the "/user=UID" qualifier, for example +"carsen.u.washington.edu/ssl/user=timo". + +5. How do I set the IMAP Mailbox Location Prefix in Eudora? + +Leave it blank. + +6. How do I set the folder location in Mutt? + + * edit .muttrc + + set spoolfile=imap://user@hostname/INBOX + set folder=imap://user@hostname/ + + * problems + mutt still helpfully offers to: + + Move read messages to /home/$user/mbox? ([no]/yes): + Some .muttrc options are: + don't ask about moving messages, just do it: + set move=yes + don't ask about moving messages and _don't_ do it: + set move=no + ask about moving message, default answer is yes: + set move=ask-yes + ask about moving message, default answer is no: + set move=ask-no + + + * References + + http://mutt.sourceforge.net/imap/ + http://jamespo.org.uk/blog/archives/000271.html + + +7. Why isn't raw logging working? + + * You haven't configured raw logging in /etc/dovecot/dovecot.conf. + See the comments in the "protocol imap" section of /etc/dovecot/dovecot.conf + for more information. + + * Your user database doesn't specify the home directory for the user. + Dovecot doesn't know where to put raw logs if the user database doesn't + tell it. + + * If you are using LDAP, the user_attrs setting in dovecot-ldap.conf + doesn't specify homeDirectory. Dovecot will only pull attributes from + the LDAP records if they are listed in this setting. + + * You don't have the dovecot.rawlog directory in the user's home + directory. Dovecot will post rawlog entries only if this directory is + present. + + * You have the dovecot.rawlog directory in the wrong directory. + +8. Why can't I change the log location? + +Dovecot doesn't change its log location if you change the config file +and send the SIGHUP signal with one of the following + +kill -1 +kill -HUP + +You have to shutdown Dovecot and restart it: + +invoke-rc.d dovecot restart + +9. Why can't users access their mail? + +Try connecting from the command line. +telnet imap2 + + * Dovecot isn't running. + + Start Dovecot. + + * Dovecot is running. + + The output from the connection attempt is: + + Connected to mailserver + Escape character is '^]'. + * Dovecot ready + + Try logging in from the command line: + + 1 LOGIN + + * Users can't LOGIN. + + The output from the login attempt is: + + 1 NO Authentication failed + + Possible reasons: + + * The user isn't in your user database. + + * The user is in your user database, but there's no password listed. + + * If you are using LDAP, the pass_attrs setting in dovecot-ldap.conf + doesn't specify password. + + * You mispelled the user name or the password. + + * You typed the wrong password. + + Hint: set "auth_verbose = yes" in dovecot.conf for more information. + + The output from the login attempt is + + 1 NO Login failed: Unsupported authentication mechanism + + Possible reasons: + + * You don't have "auth_mechanisms = plain" for any of your + authentication processes. (The above suggested LOGIN command uses plain + text authentication.) + + * Users can LOGIN, but they can't SELECT. + The output from the login attempt is : + + 1 OK logged in + + but the output from + + 2 SELECT + + is + + NO Internal error [