имеем main.cf
root@post:/etc/postfix# cat main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
## Указываем postfix что SASL авторизацию будет производить dovecot,
# а также указываем путь к сокету. Примечание: путь к сокету задан
# относительно папки /var/spool/postfix
smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth
#включить SASL поддержку в SMTP сервере postfix
smtpd_sasl_auth_enable = yes
#smtpd_sasl_local_domain = dracon753.ru
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#разрешить пересылку почты клиентам, прошедшим аутентификацию
smtpd_recipient_restrictions = permit_sasl_authenticated,reject_unauth_destination
#Созданные ключи для Sasl и TLS
smtpd_tls_cert_file=/etc/ssl/certs/postfix.pem
smtpd_tls_key_file=/etc/ssl/private/postfix.pem
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = post.dracon753.ru
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost =
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-forwards.cf, mysql:/etc/postfix/mysql-email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
# Указываем postfix какой использовать транспорт для виртуальных
# доменов (по умолчанию - virtual). Если вы используете postfixadmin
# для управления доменами, то транспорт необходимо задавать непосредственно
# в самом postfixadmin, а не через параметр virtual_transport.
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
root@post:/etc/postfix#
dovecot.conf
root@post:/home/test/rab# cat dovecot.conf
protocols = pop3 pop3s imap imaps
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
mail_location = maildir:/home/vmail/%d/%n
mail_privileged_group = vmail
mail_debug = yes
verbose_proctitle = yes
protocol imap {
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
protocol managesieve {
}
protocol lda {
log_path = /home/vmail/dovecot-deliver.log
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = andrey@dracon753.ru
mail_plugins = sieve
global_script_path = /home/vmail/globalsieverc
}
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes
auth default {
mechanisms = plain login
passdb pam {
}
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb passwd {
}
userdb static {
args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
dict {
}
plugin {
}
root@post:/home/test/rab#
root@post:/home/test/rab# cat dovecot-sql.conf
driver = mysql
connect = host=127.0.0.1 dbname=mail user=mailadmin password=drac759
default_pass_scheme = PLAIN
password_query = SELECT email as user, password FROM users WHERE email='%u';
2011-11-14 12:25:41 auth(default): Info: new auth connection: pid=1668
2011-11-14 12:25:41 auth(default): Info: client in: AUTH 1 PLAIN service=smtp nologin lip=192.168.4.25 rip=192.168.4.15 secured resp=AGFuZHJleUBkcmFjb243NTMucnUAZHI3NTkxMjM=
2011-11-14 12:25:41 auth-worker(default): Info: pam(andrey@dracon753.ru,192.168.4.15): lookup service=dovecot
2011-11-14 12:25:41 auth-worker(default): Info: pam(andrey@dracon753.ru,192.168.4.15): #1/1 style=1 msg=Password:
2011-11-14 12:25:43 auth-worker(default): Info: pam(andrey@dracon753.ru,192.168.4.15): pam_authenticate() failed: Authentication failure (password mismatch?) (given password: dr759123)
2011-11-14 12:25:43 auth-worker(default): Info: sql(andrey@dracon753.ru,192.168.4.15): query: SELECT email as user, password FROM users WHERE email='andrey@dracon753.ru';
2011-11-14 12:25:43 auth(default): Info: client out: OK 1 user=andrey@dracon753.ru
2011-11-14 12:25:43 auth(default): Info: master in: USER 1 andrey@dracon753.ru service=deliver
2011-11-14 12:25:43 auth(default): Info: passwd(andrey@dracon753.ru): lookup
2011-11-14 12:25:43 auth(default): Info: passwd(andrey@dracon753.ru): unknown user
2011-11-14 12:25:43 auth(default): Info: master out: USER 1 andrey@dracon753.ru uid=5000 gid=5000 home=/home/vmail/dracon753.ru/andrey
2011-11-14 12:25:49 auth(default): Info: client in: AUTH 1 PLAIN service=imap secured lip=192.168.4.25 rip=192.168.4.15 lport=993rport=1056
2011-11-14 12:25:49 auth(default): Info: client out: CONT 1
2011-11-14 12:25:49 auth(default): Info: client in: CONT 1 AGFuZHJleUBkcmFjb243NTMucnUAZHI3NTkxMjM=
2011-11-14 12:25:49 auth-worker(default): Info: pam(andrey@dracon753.ru,192.168.4.15): lookup service=dovecot
2011-11-14 12:25:49 auth-worker(default): Info: pam(andrey@dracon753.ru,192.168.4.15): #1/1 style=1 msg=Password:
2011-11-14 12:25:50 auth(default): Info: new auth connection: pid=1677
2011-11-14 12:25:51 auth-worker(default): Info: pam(andrey@dracon753.ru,192.168.4.15): pam_authenticate() failed: Authentication failure (password mismatch?) (given password: dr759123)
2011-11-14 12:25:51 auth-worker(default): Info: sql(andrey@dracon753.ru,192.168.4.15): query: SELECT email as user, password FROM users WHERE email='andrey@dracon753.ru';
2011-11-14 12:25:51 auth(default): Info: client out: OK 1 user=andrey@dracon753.ru
2011-11-14 12:25:51 auth(default): Info: master in: REQUEST 5 1613 1
2011-11-14 12:25:51 auth(default): Info: passwd(andrey@dracon753.ru,192.168.4.15): lookup
2011-11-14 12:25:51 auth(default): Info: passwd(andrey@dracon753.ru,192.168.4.15): unknown user
2011-11-14 12:25:51 auth(default): Info: master out: USER 5 andrey@dracon753.ru uid=5000 gid=5000 home=/home/vmail/dracon753.ru/andrey
2011-11-14 12:25:51 imap-login: Info: Login: user=<andrey@dracon753.ru>, method=PLAIN, rip=192.168.4.15, lip=192.168.4.25, TLS
2011-11-14 12:25:51 IMAP(andrey@dracon753.ru): Info: Effective uid=5000, gid=5000, home=/home/vmail/dracon753.ru/andrey
2011-11-14 12:25:51 IMAP(andrey@dracon753.ru): Info: maildir: data=/home/vmail/dracon753.ru/andrey
2011-11-14 12:25:51 IMAP(andrey@dracon753.ru): Info: maildir++: root=/home/vmail/dracon753.ru/andrey, index=, control=, inbox=/home/vmail/dracon753.ru/andrey
(andrey@dracon753.ru,192.168.4.15): pam_authenticate() failed: Authentication failure (password mismatch?) (given password: dr759123)
раньше с таким сталкивался но забыл что икак