4

複数の Web サイトをホストする Web サーバーを構築しています。メールサーバー以外はすべて機能しています。vps をホストするために linode を使用しており、そのチュートリアルに従っています。参考までに、Ubuntu 11.10 を使用しています。

これが私がたどってきたリンクhttp://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucidです。dovecotを再起動するように言われるところまで来ましたので、「service dovecot restart」してみました。しかし、その後、「restart: Unknown instance:」というメッセージが表示されます。ルートとしてログインしているので、sudo は使用していません。

それがうまくいかなかったので、「/etc/init.d/dovecot restart」を試したところ、「dovecot start/running, process 4760」が表示されました。そこで、「/etc/init.d/dovecot status」を試してみると、「dovecot stop/waiting」が表示されます。

そこで、「service dovecot start」を試したところ、「dovecot start/running, process 4781」が表示されました。ということでステータスを取得してみたところ「service dovecot status」で疲れて「dovecot stop/waiting」になりました

その後、「/etc/init.d/dovecot start」に飽きて、「dovecot start/running, process 4794」が表示されます。というわけでステータス取得に疲れたので「/etc/init.d/dovecot status」に疲れて「dovecot stop/waiting」を取得。

プロセスを強制終了するのに疲れたキックと笑いのために、「service dovecot start」を実行したときに取得した PID を使用しました。これはコマンド「kill -9 4444」で、「bash: kill: (4805)」を取得します。 - そのようなプロセスはありません」

私は何か間違ったことをしていますか?

--編集1--

以下は、/var/log/syslog で見つかった dovecot に関連するログです。

dovecot: master: Dovecot v2.0.13 starting up (core dumps disabled)
dovecot: ssl-params: Generating SSL parameters
dovecot: ssl-params: SSL parameters regeneration completed
dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: config: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
kernel: init: dovecot main process (10276) terminated with status 89
kernel: init: dovecot main process (10289) terminated with status 89
kernel: init: dovecot main process (10452) terminated with status 89
kernel: init: dovecot main process (2275) terminated with status 89
kernel: init: dovecot main process (3028) terminated with status 89
kernel: init: dovecot main process (3216) terminated with status 89
kernel: init: dovecot main process (3230) terminated with status 89
kernel: init: dovecot main process (3254) terminated with status 89
kernel: init: dovecot main process (3813) terminated with status 89
kernel: init: dovecot main process (3845) terminated with status 89
kernel: init: dovecot main process (4664) terminated with status 89
kernel: init: dovecot main process (4760) terminated with status 89
kernel: init: dovecot main process (4781) terminated with status 89
kernel: init: dovecot main process (4794) terminated with status 89
kernel: init: dovecot main process (4805) terminated with status 89

--編集 2 (/etc/dovecot/dovecot.conf)--

以下はdovecot.confファイルです

protocols = imap imaps pop3 pop3s
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir

ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem

namespace private {
    separator = .
    prefix = INBOX.
    inbox = yes
}

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = postmaster@[mydomainname.com]
    mail_plugins = sieve
    global_script_path = /home/vmail/globalsieverc
}

protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
}

auth default {
    user = root

    passdb sql {
        args = /etc/dovecot/dovecot-sql.conf
    }

    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
        }
    }
}

-- 編集 3 (/var/log/mail.log) --

以下は /var/log/mail.log の内容です

dovecot: master: Dovecot v2.0.13 starting up (core dumps disabled)
dovecot: ssl-params: Generating SSL parameters
postfix/master[9917]: daemon started -- version 2.8.5, configuration /etc/postfix
dovecot: ssl-params: SSL parameters regeneration completed
postfix/master[9917]: terminating on signal 15
postfix/master[10196]: daemon started -- version 2.8.5, configuration /etc/postfix
dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: config: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
postfix/master[2435]: daemon started -- version 2.8.5, configuration /etc/postfix
postfix/master[2435]: terminating on signal 15
postfix/master[2965]: daemon started -- version 2.8.5, configuration /etc/postfix
4

5 に答える 5

3

つまり、起動し、構成の解析を試みて失敗します。/ var / logで、鳩小屋のログを蓄積するログを探して、問題が何であるかを判断します。どのログであるかは、使用しているLinuxディストリビューションによって異なります。

- 編集 -

ステータス89は、パーサーに関連する構成にエラーがあることを意味します。すべての{}カーリーブレーサーを終了したかどうかを最初に確認してください。これが私の最初の予感です。

于 2011-11-29T23:22:27.063 に答える
0

チュートリアルは 2010 年 5 月 9 日のものです

v1.2.6 2009-10-05
v2.0.rc1 2010-07-02

したがって、チュートリアルではおそらく 1.x 構成を使用しますが、最近では dovecot 2.x を使用します。

今、私はこれを見つけましたhttp://wiki2.dovecot.org/Upgrading/2.0
他の情報の隣に、設定を 1.2 から 2.0 に変換する方法を提供します。

アップグレードの詳細については、http: //wiki2.dovecot.org/Upgrading をご覧ください。

解決策はありませんが(まだ)

編集:(解決策)

まず、以下もインストールする必要があります。

apt-get install dovecot-sieve  
apt-get install dovecot-managesieved  
apt-get install dovecot-mysql

必要に応じて、古い 1.x 構成のアップグレードに関するヒントをお読み ください http://wiki2.dovecot.org/Upgrading

私の dovecot.conf:

log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir
namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
  }
  user = root
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
#userdb {
#  args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
#  driver = static
#}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /home/vmail/dovecot-deliver.log
  mail_plugins = sieve
  postmaster_address = postmaster@example.com
  plugin {
    sieve_global_path = /var/vmail/globalsieverc
    # The include extension fetches the :personal scripts from this 
    # directory. When ManageSieve is used, this is also where scripts 
    # are uploaded.

    sieve_dir = ~/sieve

    # The location of the user's active script:

    sieve = ~/.dovecot.sieve

    # Directory for :global include scripts (for v1.1 include extension)

    sieve_global_dir = /var/vmail/sieve

    sieve_maxscriptsize = 128
  }
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

私の dovecot-db.conf.ext

driver = mysql
connect = host=127.0.0.1 dbname=mail user=mail_admin password=your_password
default_pass_scheme = PLAIN-MD5
#password_query = SELECT email as user, password FROM users WHERE email='%u';
#user_query = SELECT email as user, password, 5000 as uid, 5000 as gid, '/var/vmail/%d/%n' as home FROM view_users WHERE email='%u';
password_query = SELECT email AS user, password, 5000 AS userdb_uid, 5000 AS userdb_gid, '/var/vmail/%d/%n' AS userdb_home FROM users WHERE email = '%u';
user_query = SELECT email AS user, password, 5000 AS uid, 5000 AS gid, '/var/vmail/%d/%n' AS home FROM users WHERE email = '%u';

/etc/postfix/master.cfまた、smtps (465 で SSL/TLS を使用する smtp) が含まれるように編集します。ポート25がISPからブロックされていたため、自宅からsmtpに到達するにはそれをアクティブにする必要がありました(これは一般的です)。また、トランスポート層セキュリティを備えた smtp を好みます。

smtps     inet  n       -       -       -       -       smtpd

そして走るservice postfix restart


ソース:
グーグルでこれに関するすべての情報を収集しましたが、どこにいたのかわかりませんが、最後の問題は

2013-01-03 16:43:27 lda: Error: userdb lookup(info@example.com): Disconnected unexpectedly
2013-01-03 16:43:27 lda: Fatal: Internal error occurred. Refer to server log for more information.

http://workaround.org/ispmail/lenny/configure-dovecotのいくつかを読んで解決
しました 基本的に、ここに表示されるエラー出力をグーグルで検索すると、良い結果が得られることがわかりました。

/home/vmail/dovecot-deliver.log
/var/log/mail.log
/var/log/mail.err
/var/log/syslog
于 2013-01-03T12:52:45.827 に答える
-2

dovecot-postfix パッケージと /etc/dovecot/conf.d/99-*.conf ファイルを削除してみてください。

于 2013-10-07T14:16:44.070 に答える