[Dovecot] migrate dovecot files 1.2.16 to 2.0.13 (OpenBSD 5.0)

Wesley M. openbsd at e-solutions.re
Wed Jan 4 15:08:35 EET 2012



Hi, 

I have a mailserver(Postfix+MySql) on OpenBSD 4.9 with Dovecot
1.2.16, all works fine.
Now i want to do the same but on OpenBSD 5.0.
I
meet problems using dovecot 2.0.13 on OpenBSD 5.0. 

Some tests (on the
box):

telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to
127.0.0.1.
Escape character is '^]'.
Connection closed by foreign
host.

telnet 127.0.0.1 143
Trying 127.0.0.1...
Connected to
127.0.0.1.
Escape character is '^]'.
Connection closed by foreign
host.

Seems that pop3/imap doesn't work 

'netstat -anf inet'
tcp 0 0
*.993 *.* LISTEN
tcp 0 0 *.143 *.* LISTEN
tcp 0 0 *.995 *.* LISTEN
tcp 0 0
*.110 *.* LISTEN

Therefore, ports are open. 

When i use Roundcube
webmail, i have errors : error imap connection 

If someone can help me on.
Thank you very much.

Files to migrate (already tried to modify them) :
dovecot.conf / dovecot-sql.conf / and 'dovecot -n '


###############::::::::dovecot.conf:::::::::::#################################
base_dir
= /var/dovecot/
 protocols = imap pop3
 ssl_cert =
/etc/ssl/dovecotcert.pem
 ssl_key = /etc/ssl/private/dovecot.pem

ssl_cipher_list = HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
 disable_plaintext_auth
= yes
 default_login_user = _dovecot
 default_internal_user = _dovecot

login_process_per_connection = no
 login_process_size = 64
 mail_location =
maildir:/var/mailserv/mail/%d/%n
 first_valid_uid = 1000
 mmap_disable =
yes

protocol imap {
 mail_plugins = quota imap_quota autocreate

imap_client_workarounds = delay-newmail
 }

 protocol pop3 {

pop3_uidl_format = %08Xv%08Xu
 mail_plugins = quota

pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
 }

 protocol lda {

mail_plugins = sieve quota
 postmaster_address =
postmaster at mailr130.localdomain
 sendmail_path = /usr/sbin/sendmail

auth_socket_path = /var/run/dovecot-auth-master
 }

 auth default {

mechanisms = plain login digest-md5 cram-md5 apop
 passdb { 
 driver=sql 

args = /etc/dovecot/dovecot-sql.conf
 }

 userdb {
 driver=sql
 args =
/etc/dovecot/dovecot-sql.conf
 }

 user = root

 socket listen {
 client {

path = /var/spool/postfix/private/auth
 mode = 0660
 user = _postfix
 group
= _postfix
 }
 master {
 path = /var/run/dovecot-auth-master
 mode = 0600

user = _dovecot # User running Dovecot LDA
 group = _dovecot # Or
alternatively mode 0660 + LDA user in this group
 }
 }
 }

 plugin {

sieve=~/.dovecot.sieve
 sieve_storage=~/sieve
 }

 plugin {
 quota =
maildir
 quota_rule = *:storage=5G
 quota_rule2 = Trash:storage=100M

quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95

quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
 }


plugin {
 autocreate = Trash
 autocreate2 = Spam
 autocreate3 = Sent

autocreate4 = Drafts
 autosubscribe = Trash
 autosubscribe2 = Spam

autosubscribe3 = Sent
 autosubscribe4 = Drafts
 }

 plugin {

antispam_signature = X-Spam-Flag
 antispam_signature_missing = move # move
silently without training
 antispam_trash = trash;Trash;Deleted Items;
Deleted Messages
 antispam_spam = SPAM;Spam;spam;Junk;junk

antispam_mail_sendmail = /usr/local/bin/sa-learn

antispam_mail_sendmail_args = --username=%u
 antispam_mail_spam = --spam

antispam_mail_notspam = --ham
 antispam_mail_tmpdir = /tmp
 }


###############::::::::dovecot-sql.conf:::::::##################################
driver
= mysql
connect = host=localhost dbname=mail user=postfix
password=postfix
default_pass_scheme = PLAIN
password_query = SELECT email
as user, password FROM users WHERE email = '%u'
user_query = SELECT id as
uid, id as gid, home, concat('*:storage=', quota, 'M') AS quota_rule FROM
users WHERE email = '%u'

################### dovecot
-n########################################
# 2.0.13:
/etc/dovecot/dovecot.conf
# OS: OpenBSD 5.0 i386 ffs
auth_mechanisms =
plain login digest-md5 cram-md5 apop
base_dir =
/var/dovecot/
default_internal_user = _dovecot
default_login_user =
_dovecot
first_valid_uid = 1000
mail_location =
maildir:/var/mailserv/mail/%d/%n
mmap_disable = yes
passdb {
 args =
/etc/dovecot/dovecot-sql.conf
 driver = sql
}
plugin {

antispam_mail_notspam = --ham
 antispam_mail_sendmail =
/usr/local/bin/sa-learn
 antispam_mail_sendmail_args = --username=%u

antispam_mail_spam = --spam
 antispam_mail_tmpdir = /tmp

antispam_signature = X-Spam-Flag
 antispam_signature_missing = move

antispam_spam = SPAM;Spam;spam;Junk;junk
 antispam_trash =
trash;Trash;Deleted Items; Deleted Messages
 autocreate = Trash

autocreate2 = Spam
 autocreate3 = Sent
 autocreate4 = Drafts
 autosubscribe
= Trash
 autosubscribe2 = Spam
 autosubscribe3 = Sent
 autosubscribe4 =
Drafts
 quota = maildir
 quota_rule = *:storage=5G
 quota_rule2 =
Trash:storage=100M
 quota_warning = storage=95%%
/usr/local/bin/quota-warning.sh 95
 quota_warning2 = storage=80%%
/usr/local/bin/quota-warning.sh 80
 sieve = ~/.dovecot.sieve
 sieve_storage
= ~/sieve
}
protocols = imap pop3
service auth {
 unix_listener
/var/run/dovecot-auth-master {
 group = _dovecot
 mode = 0600
 user =
_dovecot
 }
 unix_listener /var/spool/postfix/private/auth {
 group =
_postfix
 mode = 0660
 user = _postfix
 }
 user = root
}
service imap-login
{
 service_count = 0
 vsz_limit = 64 M
}
service pop3-login {

service_count = 0
 vsz_limit = 64 M
}
ssl_cert =
/etc/ssl/dovecotcert.pem
ssl_cipher_list =
HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
ssl_key =
/etc/ssl/private/dovecot.pem
userdb {
 args =
/etc/dovecot/dovecot-sql.conf
 driver = sql
}
protocol imap {

imap_client_workarounds = delay-newmail
 mail_plugins = quota imap_quota
autocreate
}
protocol pop3 {
 mail_plugins = quota
 pop3_client_workarounds
= outlook-no-nuls oe-ns-eoh
 pop3_uidl_format = %08Xv%08Xu
}
protocol lda
{
 auth_socket_path = /var/run/dovecot-auth-master
 mail_plugins = sieve
quota
 postmaster_address = postmaster at mailr130.localdomain
 sendmail_path
= /usr/sbin/sendmail
} 

Cheers, 

Wesley. M
www.mouedine.net


More information about the dovecot mailing list