Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th August 2011, 03:35
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default Switch from courier to dovecot

All,

I'm trying to migrate an ISPConfig v3 system from Courier to Dovecot - I have a number of Apple Mail clients and they cause Courier to have kittens as everything ignores the IDLE command, the server even with it turned off still allows it, even with it turned off in Apple Mail it still tries to connect aggressively so I thought I'd try dovecot as the solution.

How do I get ISPConfig once I have apt-get install dovecot-imapd to rewrite the configs as it does during it's initial install.

I did run ispconfig_update.sh but I'm using the latest production version already. Can you force an update to the same version somehow? I did the configs written when I upgraded to latest svn but I really need to stay on stable.

When I attempted the latest SVN - all I got in the syslog was:

Aug 19 02:19:17 server dovecot: auth-worker(default): sql(elliothurst@XXXX.com,94.8.71.239): Password query failed: Unknown column 'login' in 'where clause'
Aug 19 02:19:17 server dovecot: auth-worker(default): sql(mail@XXX.com,94.8.71.239): Password query failed: Unknown column 'login' in 'where clause'

Also when switching from Courier to dovecot I've read that the following is a good idea:

namespace private {
prefix = INBOX.
inbox = yes
}

This keeps the clients and server operating like a Courier IMAP server - should this be enabled?

Perhaps someone could send me the dovecot configs that work on the last stable?

Cheers and thanks for reading even if you can't help

Keith
Reply With Quote
Sponsored Links
  #2  
Old 19th August 2011, 08:54
mentes mentes is offline
Senior Member
 
Join Date: Aug 2011
Location: Spain
Posts: 132
Thanks: 4
Thanked 14 Times in 13 Posts
Default

I had a server with Courier before (without ISPConfig) and the solution for OS X Mail.app is:

Edit Courier configuration and increase the value MAXPERIP
Reply With Quote
  #3  
Old 19th August 2011, 09:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,249 Times in 4,114 Posts
Default

Courier and dovecot have a different maildir filder layout, so if you install dovecot on a server that currently runs courier, you will have to move folders in all maildirs. Otherwise your clients will not see their emails anymore.

I guess the better option is to just set a higher myxperIP setting in the courier config, as courier works fine with mac and windows clients on our servers.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 19th August 2011, 11:35
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

I've already set MAXPERIP to 150 and it's still causing issues.

I have 450 IMAP daemons and they still get timeouts due to them not being enough. You can imagine 450 uses a significant amount of memory. This is only for 4 people!

The biggest problem is on the 1 IP, you maybe have 2 Macs along with an iPhone and on the server they might have 15 IMAP accounts they check ....

Running 450 daemons with the need to increase can't be the solution.

I already run courier (apt-get) and dovecot (compliled from source) on another debian system together, courier imap is used for the webmail and dovecot is used for external imap access but it means I can enable and disable imap per mailbox whilst still allowing squirrelmail imap via webmail - the default Maildir layout that the Postfix VDA does work happily with both.

I will install a new ISPConfig instance with Dovecot instead, work out the differences - surely they're can't be any in layout if you still use Postfix+Maildrop for delivery? and script something so that if people want to switch they can.

Why is the dropdown in ISPConfig that allows you to choose Courier or Dovecot? What is that meant to do if it's not to allow the easy switching from one to another?

K

Last edited by todgerme; 19th August 2011 at 11:46. Reason: spelling
Reply With Quote
  #5  
Old 19th August 2011, 12:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,249 Times in 4,114 Posts
Default

ISPConfig uses deliver and not maildrop for dovecot installs. And yes, the layout is different then.

Quote:
Why is the dropdown in ISPConfig that allows you to choose Courier or Dovecot?
This is set at install time. You can change that of course ölater too, but you will have to modify all maildirs then.

Quote:
What is that meant to do if it's not to allow the easy switching from one to another?
It allows you to switch from one daemon to another. Nobody sayd that this does not require additional changes.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 19th August 2011, 12:52
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

Asking a silly question - why was a different layout chosen for Dovecot installs when it could have been a straight replacement for the Courier/Maildrop without additional Maildir structure changes?
Reply With Quote
  #7  
Old 19th August 2011, 15:35
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

Have managed to get Dovecot working with the Courier config in ISPConfig for anyone that needs to switch an already working production system.

We will leave Courier POP untouched.

In Debian

Code:
apt-get install dovecot-imapd
This will uninstall Courier IMAP only.

Now we leave ISPConfig alone. We need to update the dovecot.conf in /etc/dovecot to relate to the Courier settings and not the Dovecot under ISPConfig settings:

Code:
protocols = imap
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = mail
protocol imap {
  mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
  mail_plugins = quota imap_quota 
  imap_client_workarounds = outlook-idle
}
  

login_greeting = Welcome to my IMAP Server.

mail_location = maildir:/var/vmail/%d/%n/

namespace private {
  prefix = INBOX.
  inbox = yes
}


auth default {
  #mechanisms = plain login
  mechanisms = plain login cram-md5 digest-md5
  passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }

        userdb static {
        args = uid=5000 gid=5000 home=/var/vmail/%d/%n
    }

  user = root
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0600
    }
  client {
          path = /var/spool/postfix/private/auth
          mode = 0660
          user = vmail
          group = vmail
        }
  }
}
dict {
}
plugin {
  quota = maildir
}
dovecot-sql.conf show now look like this:

Code:
driver = mysql
connect = host=localhost dbname=dbispconfig user=ispconfig password=XXXXXXXXX
default_pass_scheme = CRYPT

password_query = SELECT password FROM mail_user WHERE email = '%u' AND disableimap = 'n'
Note I have only done the basics and ignored quota. I've disabled the LDA agent with Dovecot and still uses Postfix/Maildrop

Hopefully someone might find this useful or perhaps it could be worked into ISPConfig for users that only wish to switch IMAP servers but keep Maildrop without the major headache of changes to the filesystem.

I have a few questions though - what is the protocol managesieve{} in the original ISPConfig version of the config - is that like Maildrop for filtering?
Reply With Quote
The Following User Says Thank You to todgerme For This Useful Post:
voidzero (14th November 2011)
  #8  
Old 14th November 2011, 03:05
voidzero voidzero is offline
HowtoForge Supporter
 
Join Date: Mar 2009
Posts: 63
Thanks: 11
Thanked 3 Times in 3 Posts
Default

I was just considering to do a similar migration. Have you thus far found any kinks and/or problems with this transition?
Reply With Quote
  #9  
Old 14th November 2011, 08:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,249 Times in 4,114 Posts
Default

The main problem that I see with this solution that uses the courier folder layout instead of the one from dovecot is that imap clients like outlook might show errors when they read in the list of all imap folders (e.g. when you use the ubscribe to imap folder function) as they mix up some config files with imap folders. These errors were the reason that dovecot uses a different layout in ISPConfig then Courier and by using the courier layout, you will get these problems that made us change the layout.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 14th November 2011, 11:11
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Hi,

No problems in the end

Here is an example of what it leads to:

-rw------- 1 root root 1727 2006-09-10 14:20 mess
drwxr-xr-x 2 root root 4096 2007-11-23 15:18 stuff
drwx------ 2 vmail vmail 1 2010-10-20 17:58 courierimapkeywords
-rw-r--r-- 1 vmail vmail 2155 2010-11-15 15:10 courierpop3dsizelist
-rw------- 1 vmail vmail 0 2010-11-20 12:27 dovecot-uidvalidity.4ce7bf09
drwxr-xr-x 2 vmail vmail 4096 2011-10-12 15:27 courierimaphieracl
-rw-r--r-- 1 vmail vmail 11309 2011-10-12 15:28 courierimapsubscribed
-rw------- 1 vmail vmail 90 2011-10-13 12:04 dovecot-keywords
-rw-r--r-- 1 vmail vmail 2237 2011-10-19 18:23 courierimapuiddb
-rw------- 1 vmail vmail 8396 2011-11-13 15:44 subscriptions
-rw------- 1 vmail vmail 8 2011-11-13 15:45 dovecot-uidvalidity
-rw------- 1 vmail vmail 1360 2011-11-14 05:32 dovecot.index
drwx------ 2 vmail vmail 1 2011-11-14 09:43 tmp
drwx------ 2 vmail vmail 1 2011-11-14 09:52 new
-rw------- 1 vmail vmail 64512 2011-11-14 09:52 dovecot.index.cache
-rw------- 1 vmail vmail 2714 2011-11-14 09:57 dovecot-uidlist
-rw------- 1 vmail vmail 77 2011-11-14 09:57 maildirsize
drwx------ 2 vmail vmail 1048576 2011-11-14 09:57 cur
-rw------- 1 vmail vmail 5636 2011-11-14 09:58 dovecot.index.log

Dovecot reads the dovecot cache and ignores the older courier junk, no issues reported by any users. Dovecot appears to handle the aggressive Apple Mail client better by far and can run many more daemons with as much memory.

Since then I added the quota back in:

dovecot-sql.conf:
Code:
user_query = SELECT CONCAT('/u0/vmail/',CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1))) AS home, 5000 AS uid, 5000 AS gid, CONCAT('maildir:storage=',quota,'B') AS quota FROM dbispconfig WHERE email = '%u'
Changing dovecot.conf:

Code:
   

    userdb static {
        args = uid=5000 gid=5000 home=/u0/vmail/%d/%n
    }
to

Code:
   
passdb sql {
        args = /etc/dovecot-sql.conf
    }
The only problem you will run into is an upgrade to ISPConfig because the system becomes a mismash of courier and dovecot and I haven't tried an upgrade but I would imagine, the easiest thing would be to have courier-imap installed but disabled and install dovecot from source which will keep it away from the upgrade script in ISPConfig.

If you have any problems let me know, always happy to lend a hand.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SOS,Can not receive mail! jason.cn Installation/Configuration 1 4th May 2011 17:38
MySQL Error Nolan Installation/Configuration 12 16th February 2011 02:15
Exhausted every resource: can't login to dovecot jonc Server Operation 1 12th February 2011 11:38
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 16:59
Postfix can't received email from exterior astra2000 Server Operation 5 17th October 2009 23:26


All times are GMT +2. The time now is 19:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.