HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Courier to Dovecot migration (http://www.howtoforge.com/forums/showthread.php?t=44056)

goebelmeier 12th March 2010 15:23

Courier to Dovecot migration
 
Hey,

is there already a migration path / best practice, to change imapd from courier to dovecot. I'm running ISPConfig 3.0.2 on Debian Lenny.

Thanks in advance,

Timo

till 12th March 2010 17:56

Courier and dovecot implementations use a different maildir layou, so you can not simply switch the imap daemon. If you want to migrate your server to dovecot, you will have to create a new "Maildir" subfolder in every ecisting maildir and copy all the contents of the existing maildir into this new subfolder. Exa,ple:

Courier layout:

/var/vmail/domian.com/user/

Dovecot Layout:

/var/vmail/domian.com/user/Maildir/

If your users have created any mailfilters, then these filters will get lost as they are written in maildrop syntax and not sieve as required by dovecot.

goebelmeier 4th April 2010 15:13

If found 2 helpful information sources regarding courier migrations, i.e.:
http://wiki.dovecot.org/Migration/Courier and http://www.arschkrebs.de/slides/dovecot-slides.pdf

Imagining i would like to dismiss all my mailfilter rules (which are not much in this case), which tasks i would have to do regarding ISPConfig to get my system up and running again? I would appreciate to get rid of courier soon :-)

Thanks in advance, Timo!

djtremors 8th April 2010 13:26

I've got a successful migration working on my config with sieve filtering and managesieve for squirrelmail rule editing and so on.

the only thing that doesnt work is updating the ispconfig_mailsize file in each homedir as it's processed by maildrop rules.

I'm currently working on a dovecot solution using global sieve script to process mail for each user. only problem i'm still trying to fix is that it's not running as vmail:vmail user causing me grief and for some reason the ispc dev guys didnt use db tables to populate the counts so atm i'm trying to make it use dovecot transport which is suppose to run as vmail:vmail but still doesn't..

getting there.....

till 8th April 2010 13:31

Quote:

the only thing that doesnt work is updating the ispconfig_mailsize file in each homedir as it's processed by maildrop rules.
Yes, thats not implemented yet as sieve lacks some functions that maildrop has. It is planned to implement a different solution for dovecot that is based on the dovecot binlog.

Quote:

and for some reason the ispc dev guys didnt use db tables to populate the counts
Not sure what you mean with that.

goebelmeier 8th April 2010 15:28

Quote:

Originally Posted by djtremors (Post 224511)
I've got a successful migration working on my config with sieve filtering and managesieve for squirrelmail rule editing and so on.

Could you please shortly post a list of steps what you currently did for that successful migration? Maybe we can avoid some obstacles you had while your migration.

radim_h 16th May 2010 23:26

Quote:

Originally Posted by till (Post 221904)
Courier and dovecot implementations use a different maildir layou, so you can not simply switch the imap daemon. If you want to migrate your server to dovecot, you will have to create a new "Maildir" subfolder in every ecisting maildir and copy all the contents of the existing maildir into this new subfolder. Exa,ple:

Courier layout:

/var/vmail/domian.com/user/

Dovecot Layout:

/var/vmail/domian.com/user/Maildir/

If your users have created any mailfilters, then these filters will get lost as they are written in maildrop syntax and not sieve as required by dovecot.

In 1.2.9 (Ubuntu 10.04) is directive in /etc/dovecot.conf
mail_location , which should be set to
mail_location = maildir:/var/vmail/%d/%n

Assuming i have to stay with mail_location = maildir:/var/vmail/%d/%n/Maildir as ISPC3 dovecot mail plugin is expecting this location ?

till 17th May 2010 12:52

The dovecot mail location is read directly from the ispconfig database. Please see dovecot-sql.conf file. The mail_location setting in dovecot.conf is not used, so do not alter it.

radim_h 17th May 2010 13:26

Quote:

Originally Posted by till (Post 228350)
The dovecot mail location is read directly from the ispconfig database. Please see dovecot-sql.conf file. The mail_location setting in dovecot.conf is not used, so do not alter it.

the mail_location setting must be set, or dovecot will not start..
i spent couple hours yeasterday with setting up dovecot in Ubuntu 10.04
and here is my config, may be useful for someone..
Be Aware, that Sieve settings are not included, as i was not able to set sieve correctly yet. I'm also not sure quota works as Roundcubemail doensn't show quota as it does for courier :((

Dovecot config Ubuntu 10.04:

protocols = imap imaps pop3 pop3s
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "

ssl_cert_file = /etc/ssl/_.mydomain.tld/_.mydomain.tld.crt
ssl_key_file = /etc/ssl/_.mydomain.tld/_.mydomain.tld.key

mail_privileged_group = mail

## IMAP specific settings
protocol imap {
mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
mail_plugins = quota
#mail_plugin_dir = /usr/lib/dovecot/modules/imap
}

## POP3 specific settings
protocol pop3 {
mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}

##
## LDA specific settings
##

protocol lda {
# Address to use when sending rejection mails.
postmaster_address = postmaster@example.com

# Hostname to use in various parts of sent mails, eg. in Message-Id.
# Default is the system's real hostname.
#hostname =

# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
mail_plugin_dir = /usr/lib/dovecot/modules/lda

# Binary to use for sending mails.
#sendmail_path = /usr/lib/sendmail

# UNIX socket path to master authentication server to find users.
auth_socket_path = /var/run/dovecot/auth-master

# Enabling Sieve plugin for server-side mail filtering
mail_plugins = sieve quota
}

## Authentication processes
##

# Executable location
#auth_executable = /usr/lib/dovecot/dovecot-auth
auth default {
mechanisms = plain login
passdb pam {
}



# SQL database <doc/wiki/AuthDatabase.SQL.txt>
passdb sql {
# Path for SQL configuration file
args = /etc/dovecot/dovecot-sql.conf
}

## dovecot-lda specific settings
##
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail # User running Dovecot LDA
#group = vmail # Or alternatively mode 0660 + LDA user in this group
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}

}

dict {
#quota = mysql:/etc/dovecot-dict-quota.conf
}

## Plugin settings
plugin {
quota = maildir

}

mail_uid = 5000
mail_gid = 5000

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


All times are GMT +2. The time now is 20:10.

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