Код: Выделить всё
base_dir = /var/run/dovecot/
protocols = imap pop3 imaps pop3s
listen = *
disable_plaintext_auth = no
shutdown_clients = no
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log
ssl_listen = *
ssl = yes
ssl_cert_file = /etc/ssl/certs/mail.pem
ssl_key_file = /etc/ssl/certs/mail.pem
login_dir = /var/run/dovecot/login
login_chroot = yes
login_user = dovecot
login_greeting = Microsoft POP3 server
mail_location = maildir:/var/mail/%d/%n
mail_uid = vexim
mail_gid = vexim
mail_privileged_group = vexim
mail_debug =yes
verbose_proctitle = yes
first_valid_uid = 500
last_valid_uid = 0
first_valid_gid = 0
last_valid_gid = 0
valid_chroot_dirs = /var/mail
protocol imap {
imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_verbose = no
auth_debug_passwords = no
auth default {
mechanisms = plain login cram-md5
passdb sql {
args = /usr/local/etc/dovecot-sql.conf
}
userdb sql {
args = /usr/local/etc/dovecot-sql.conf
}
user = vexim
}
dovecot-sql.conf
Код: Выделить всё
driver = mysql
connect = host=localhost user=root password=123456 dbname=exim
#default_pass_scheme = CRAM-MD5
default_pass_scheme = PLAIN-MD5
password_query = SELECT users.crypt as `password` FROM users,domains WHERE users.username = '%u' AND users.enabled = '1' AND users.type='local' and domains.enabled='1' and domains.domain_id = users.domain_id
user_query = SELECT pop as home, uid, gid FROM users WHERE username = '%u'
используются шифрования : MD5
В базе:
Код: Выделить всё
localpart: test
username: test@eem.vttisa.kz
clear: 123456
crypt: $1$mhC61Bdm$LU5X4Xku.8Cu0Zs63Inlb/
uid: 90
gid:90
Код: Выделить всё
Jun 01 11:59:31 pop3-login: Info: Disconnected (auth failed, 1 attempts): user=<test>, method=PLAIN, rip=192.168.10.2, lip=192.168.10.5