Разобрался - нужно создать почтовый ящик с именем админа. Т.е. если я завел админа admin@mailer.hutor.ru, то нужно создать домен mailer.hutor.ru и в нем почтовый ящик admin@mailer.hutor.ru и тогда все заработает. А теперь новая проблема: пытаюсь получить почту
[root@mailer /usr/local/etc/authlib]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user ghopper@mailer.test.ru
+OK Password required.
pass password
-ERR Temporary problem, please try again later
Connection closed by foreign host.
В лог пишет:
Jul 9 14:34:58 mailer courier-imap: Connection, ip=[127.0.0.1]
Jul 9 14:35:00 mailer /usr/sbin/cron[6910]: (root) CMD (/usr/libexec/atrun)
Jul 9 14:35:07 mailer authdaemond: received auth request, service=pop3, authtype=login
Jul 9 14:35:07 mailer authdaemond: authmysql: trying this module
Jul 9 14:35:07 mailer authdaemond: authmysqllib: connected. Versions: header 50083, client 50083, server 50083
Jul 9 14:35:07 mailer authdaemond: Install of a character set for MySQL: utf8
Jul 9 14:35:07 mailer authdaemond: SQL query: SELECT username, crypt, password, 1981, 1981, home, maildir, quota, name, auxoptions FROM mailbox WHERE username = 'ghopper@mail.test.ru' AND (active='1')
Jul 9 14:35:07 mailer authdaemond: mysql_query failed, reconnecting: Unknown column 'crypt' in 'field list'
Jul 9 14:35:07 mailer authdaemond: authmysqllib: connected. Versions: header 50083, client 50083, server 50083
Jul 9 14:35:07 mailer authdaemond: Install of a character set for MySQL: utf8
Jul 9 14:35:07 mailer authdaemond: mysql_query failed second time, giving up: Unknown column 'crypt' in 'field list'
Jul 9 14:35:07 mailer authdaemond: authmysql: TEMPFAIL - no more modules will be tried
Jul 9 14:35:07 mailer courier-imap: LOGIN FAILED, user=ghopper@mailer.test.ru, ip=[127.0.0.1]
Jul 9 14:35:07 mailer courier-imap: authentication error: Input/output error
courer-authlib ищет в БД поля username, crypt, password, 1981, 1981, home, maildir, quota, name, auxoptions, половины из которых там нет. Структура БД создавалась через postfixadmin.
[root@mailer /usr/local/etc/authlib]# cat authmysqlrc | grep -v ^# | grep -v ^$
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_CHARACTER_SET utf8
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 1981
MYSQL_GID_FIELD 1981
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD home
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
MYSQL_AUXOPTIONS_FIELD auxoptions
MYSQL_WHERE_CLAUSE active='1'
Как быть?
P.S. По поводу MYSQL_CRYPT_PWFIELD у меня так пишется:
##NAME: MYSQL_CRYPT_PWFIELD:0
#
# Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both
# are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
# passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow
# CRAM-MD5 authentication to be implemented.