Postfix+PostfixAdmin+Dovecot

Randy Gordey rgordey at tcworks.net
Mon Aug 14 19:38:40 EEST 2017


I got postfix and PostfixAdmin working and I am trying to get Dovecot to use
the same SQL databases.

 

This is all it says when I telnet in:

[root at fedora dovecot]# telnet 192.168.1.200 143

Trying 192.168.1.200...

Connected to 192.168.1.200.

Escape character is '^]'.

* BYE Disconnected: Auth process broken

Connection closed by foreign host.

[root at fedora dovecot]#

 

 

Please help me diagnose what is wrong?

 

 

[root at fedora dovecot]# dovecot --version

2.2.31 (65cde28)

[root at fedora dovecot]#

 

 

 

[root at fedora dovecot]# dovecot -n

# 2.2.31 (65cde28): /etc/dovecot/dovecot.conf

doveconf: Warning: NOTE: You can get a new clean config file with: doveconf
-n > dovecot-new.conf

doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:128:
protocol { ssl_listen } has been replaced by service { inet_listener {
address } }

# OS: Linux 4.11.11-300.fc26.x86_64 x86_64 Fedora release 26 (Twenty Six)

auth_default_realm = gordeys.com

auth_mechanisms = plain login

disable_plaintext_auth = no

first_valid_uid = 2222

listen = *

mail_location = maildir:/var/mail/vmail/%u/

mbox_write_locks = fcntl

namespace inbox {

  inbox = yes

  location =

  mailbox Drafts {

    special_use = \Drafts

  }

  mailbox Junk {

    special_use = \Junk

  }

  mailbox Sent {

    special_use = \Sent

  }

  mailbox "Sent Messages" {

    special_use = \Sent

  }

  mailbox Trash {

    special_use = \Trash

  }

  prefix =

}

passdb {

  driver = pam

}

passdb {

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

  driver = sql

}

service imap-login {

  inet_listener imaps {

    address = *

  }

}

service pop3-login {

  inet_listener pop3s {

    address = *

  }

}

ssl_cert = </etc/pki/dovecot/certs/dovecot.pem

ssl_cipher_list = PROFILE=SYSTEM

ssl_key =  # hidden, use -P to show it

userdb {

  driver = passwd

}

userdb {

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

  driver = sql

}

[root at fedora dovecot]#

 

 

[root at fedora dovecot]# more dovecot-sql.conf

connect = host=localhost dbname=postfix user=postfix password=postfix

# Use either

driver = mysql

# Or

# driver = pgsql

 

 

# Default password scheme - change to match your Postfixadmin setting.

# depends on your $CONF['encrypt'] setting:

# md5crypt  -> MD5-CRYPT

# md5       -> PLAIN-MD5

# cleartext -> PLAIN

default_pass_scheme = MD5-CRYPT

 

# Query to retrieve password. user can be used to retrieve username in other

# formats also.

 

password_query = SELECT username AS user,password FROM mailbox WHERE
username = '%u' AND active='1'

 

 

# Query to retrieve password. user can be used to retrieve username in other

# formats also.

 

password_query = SELECT username AS user,password FROM mailbox WHERE
username = '%u' AND active='1'

 

# Query to retrieve user information, note uid matches dovecot.conf AND
Postfix virtual_uid_maps param

eter.

user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE
username = '%u' AND active='1

'

 

 

# MYSQL :

user_query = SELECT CONCAT('/var/vmail/mail/', maildir) AS home, 1001 AS
uid, 1001 AS gid,

        CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username
= '%u' AND active='1'

# PostgreSQL : (no Quota though) :

# user_query = SELECT '/var/vmail/mail/' || maildir AS home, 1001 as uid,
1001 as gid FROM mailbox WHE

RE username = '%u' AND active = '1'

 

[root at fedora dovecot]#

 



More information about the dovecot mailing list