我正在build立一个Web服务器来托pipe多个网站。 除了邮件服务器,我得到了所有的工作。 我使用linode来托pipe我的VPS,我一直在关注他们的教程。 仅供参考,我使用的是Ubuntu 11.10。
这里是我一直在关注的链接, http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid 。 我起床到它告诉我重新启动鸽子的部分,所以我尝试了“服务dovecot重启”。 但是,然后我得到这个“重启:未知的实例:”。 我以root身份login,所以我没有使用sudo。
由于没有工作,我试图“/etc/init.d/dovecot restart”,我得到“dovecot启动/运行,进程4760”。 所以我尝试“/etc/init.d/dovecot状态”,我得到“鸽子停止/等待”。
所以我尝试了“服务dovecot开始”,我得到“dovecot启动/运行,进程4781”。 所以我试图获得地位,所以我厌倦了“服务鸽舍身份”,并得到“鸽舍停止/等待”
然后,我厌倦了“/etc/init.d/dovecot start”,并得到“dovecot启动/运行,进程4794”。 所以我厌倦了获取状态,所以我厌倦了“/etc/init.d/dovecot status”并得到了“dovecot stop / waiting”
只是为了踢球和咯咯,我厌倦了这个过程,我使用了“服务dovecot开始”时得到的PID,这个命令是“kill -9 4444”,我得到了这个“bash:kill:(4805) – 没有这样的过程“
难道我做错了什么?
– EDIT 1-
以下是在/ var / log / syslog中find涉及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
这意味着它启动,尝试解析配置失败。 在/ var / log中查找累积dovecot日志记录的日志,以确定问题所在。 它的日志取决于你正在使用的Linux发行版。
– 编辑 –
状态89意味着配置中有一个错误,与解析器有关。 请先看看是否已经终止了所有的{}卷曲护腕。 这将是我的第一个预感。
作为一般的技巧,尝试直接在前台运行dovecot:
鸽子 – F
原因是前台经常会直接向控制台输出loadup错误消息,这通常会让你快速追踪那些通常不记录的错误(比如配置解析错误)。
本教程是从2010年5月9日。
看着鸽舍的更新日志,你会看到…
v1.2.6 2009-10-05
在这个日期之前的最后一个dovecot版本
v2.0.rc1 2010-07-02
该日期之后的下一个dovecot版本
所以教程可能会使用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/Upgrade的提示
我的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)。 我不得不激活它从我家到达smtp,因为端口25被阻止从我的isp(这是常见的)。 另外我更喜欢smtp与传输层安全。
smtps inet n - - - - smtpd
并运行service postfix restart
资料来源:
我通过google搜集了关于这方面的所有信息,不知道我在哪里到处都是,但是最后一个问题
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
如果系统日志中没有出现相关消息,并且dovecot正在Upstart下运行,则可以在/var/log/upstart/dovecot.log
找到配置错误。
所有功劳由CameronNemo评论 。
尝试删除dovecot-postfix软件包和/etc/dovecot/conf.d/99-*.conf文件它对我来说很有帮助