Dovecotでエラー発生。
ちっとも先に進まない。(涙)
さて、エラーの内容は
|
1 2 3 |
Oct 19 13:57:59 master: Error: service(auth): command startup failed, throttling for 60.000 secs Oct 19 13:58:46 master: Warning: Killed with signal 15 (by pid=40645 uid=0 code=unknown 0) Oct 19 14:00:56 auth: Fatal: Unknown authentication mechanism 'CRAM-MD' |
CRAM-MDってなんやねん。
Google先生に尋ねても判らんねん。
それに、imapでloginに失敗する。
|
1 |
Oct 20 16:30:43 imap-login: Info: Disconnected: Auth process broken (disconnected before auth was ready, waited 31 secs): user=<>, rip=192.168.0.71, lip=192.168.0.35, TLS, session=<oDZVTHLrIvvAqABH> |
userにどうしても名前が入らない。
なんでやねん。
CRAM-DMのせいなのか?そうなのか?
CRAM-DM許すまじ!(八つ当たり)
探してみたら、Dovecot の認証時に dovecot: master: Error: service(auth): command startup failed, throttling が出ると言うのが見つかった。
早速やってみる。
/opt/local/etc/dovecot/conf.d/10-auth.confに
|
1 |
auth_mechanisms = plain login apop cram-md 5digest-md5 gssapi |
とあったので、順に消していく。
|
1 |
auth_mechanisms = plain login apop |
ここまで消してみた。
今度は、別のエラーになった。
|
1 2 |
Oct 20 17:32:04 auth: Fatal: Support not compiled in for passdb driver 'sql' Oct 20 17:32:04 master: Error: service(auth): command startup failed, throttling for 16.000 secs |
sqlの設定に間違いがあるらしい。
|
1 |
!include auth-sql.conf.ext |
とauth-sql.conf.extを生かして、mysqlからuser nameとpasswordの照合をおこなってみたが、そっちが間違ってるようだ。
/opt/local/etc/dovecot/conf.d/auth-sql.conf.extの中身を確認、修正しよう。
中身は、dovecot-dict-sql.conf.extの問題らしい。
今度は/opt/local/etc/dovecot/dovecot-dict-sql.conf.extの中身の書き換え。
確か、databaseの接続やらの羅列だった筈。
PostfixAdminで作ったDatabaseをPhpMyAdminで確認すると、全てのデータはmailboxに一括して入っているようだ。
同じdatabase上にquotaとquota2のテーブルもあり、dovecotはそちらを見るのがデフォルトのようである。
dovecot-dict-sql.conf.extの中身を見てみると、次のようになっている。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# This file is commonly accessed via dict {} section in dovecot.conf #connect = host=localhost dbname=mails user=testuser password=pass # CREATE TABLE quota ( # username varchar(100) not null, # bytes bigint not null default 0, # messages integer not null default 0, # primary key (username) # ); map { pattern = priv/quota/storage table = quota2 username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota2 username_field = username value_field = messages } |
dbname、user、passwordを書き換え、quotaをquota2にすれば、アクセスはできそうだ。
だが、しかし、中身が無い。全くの空っぽである。
それに名前に対するパスワードは何処で見つけるのだろう?
これで良いのか?
いけない気がする、とてもする。
今現在、imapでアクセスすると、error.logにはこう出る。
|
1 2 |
Oct 21 16:40:11 auth: Fatal: Unknown passdb driver 'mysql' Oct 21 16:40:11 master: Error: service(auth): command startup failed, throttling for 2.000 secs |
ちっとも先に進まん。
因みに、dovecot -n(確か変更部分のみ)の内容は次の通り。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# 2.3.19.1 (9b53102964): /opt/local/etc/dovecot/dovecot.conf # OS: Darwin 17.7.0 x86_64 hfs # Hostname: macmi2.lo.k-in.co.jp auth_debug = yes auth_default_realm = k-in.co.jp auth_gssapi_hostname = $ALL auth_mechanisms = plain login apop auth_realms = k-in.co.jp lo.k-in.co.jp macmini.k-in.co.jp auth_socket_path = /opt/local/var/run/dovecot/auth-userdb auth_username_format = %n auth_verbose = yes base_dir = /opt/local/var/run/dovecot/ debug_log_path = /opt/local/var/log/dovecot/debug.log dict { quota = mysql:/opt/local/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no imap_id_log = * imap_id_send = "name" * "version" * info_log_path = /opt/local/var/log/dovecot/info.log listen = * log_path = /opt/local/var/log/dovecot/error.log mail_debug = yes mail_location = maildir:/Volumes/Works/Library/Mail/mail/%u mail_plugins = quota zlib acl fts fts_sk namespace { location = maildir:/opt/local/var/mail/%%u:INDEX=/opt/local/var/mail/shared/%%u prefix = shared.%%u. separator = . } 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 { args = /opt/local/etc/dovecot/dovecot-sql.conf.ext driver = mysql } postmaster_address = postmaster@macmini.k-in.co.jp protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } service imap { client_limit = 5 process_limit = 200 service_count = 0 } service lmtp { unix_listener lmtp { mode = 0600 } } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service pop3 { client_limit = 5 process_limit = 200 service_count = 0 } ssl = required ssl_ca = </opt/local/etc/ssl/certs/mail.k-in.co.jp.chain.pem ssl_cert = </opt/local/etc/ssl/certs/mail.k-in.co.jp.cert.pem ssl_key = # hidden, use -P to show it userdb { args = /opt/local/etc/dovecot/dovecot-sql.conf.ext driver = mysql } userdb { args = /opt/local/etc/dovdot/dovecot-sql.conf.ext driver = mysql } verbose_proctitle = yes verbose_ssl = yes protocol pop3 { passdb { args = /opt/local/etc/dovecot/conf.d/auth-sql.conf.ext driver = mysql name = result_failure = return-fail result_internalfail = return-fail result_success = return-ok } } |

