启动dovecot失败,143端口already in use
更改dovecot.conf后想重启这个,发现dovecot也用143端口,但是imapd已经占了这个端口
我用kill -9试过杀掉这个进程,但是杀完就再出来一个,
早上那个在outlook上可发不可收的问题眼看就有希望了。。。
[最优解释]
直接/etc/init.d/xxxx stop 也不行吗
[其他解释]
不要轻易放弃 一定要搞出来!
我会持续关注的
[其他解释]
awk '{print $2}'
[其他解释]
当然了 这跟你的dovecot.conf配置有关
通推荐你配置即支持imap的也支持pop3的dovecot
[其他解释]
进来学习下。
[其他解释]
直接通过/etc/init.d
[其他解释]
恩,/etc/init.d/dovecot stop 也失败
[其他解释]
本来是想restart 后来停止和启动都失败,我只用stop也测试过,也失败
[其他解释]
dovecot支持imap也支持pop
dovecot启动后
imap 占用143
pop 占用110
按说关闭dovecot是没问题的呀!
/etc/init.d/dovecot stop
失败的错误信息时什么
[其他解释]
[root@mail mail]# /etc/init.d/dovecot stop
停止 Dovecot Imap: [失 败]
就因为没有提示,所以更郁闷,呵呵~
[其他解释]
imapd 2538 cyrus 4u IPv6 7830 TCP *:imap (LISTEN)
imapd 2543 cyrus 0u IPv4 7950 TCP mail.shishanglife.com:imap->116.226.49.94:19701 (ESTABLISHED)
imapd 2543 cyrus 1u IPv4 7950 TCP mail.shishanglife.com:imap->116.226.49.94:19701 (ESTABLISHED)
imapd 2543 cyrus 2u IPv4 7950 TCP mail.shishanglife.com:imap->116.226.49.94:19701 (ESTABLISHED)
imapd 2543 cyrus 4u IPv4 7832 TCP *:imap (LISTEN)
imapd 2569 cyrus 4u IPv6 7830 TCP *:imap (LISTEN)
imapd 2571 cyrus 4u IPv4 7832 TCP *:imap (LISTEN)
imapd 2687 cyrus 4u IPv6 7830 TCP *:imap (LISTEN)
imapd 2688 cyrus 4u IPv6 7830 TCP *:imap (LISTEN)
imapd 2689 cyrus 4u IPv6 7830 TCP *:imap (LISTEN)
imapd 2691 cyrus 4u IPv4 7832 TCP *:imap (LISTEN)
imapd 2692 cyrus 4u IPv4 7832 TCP *:imap (LISTEN)
imapd 2693 cyrus 4u IPv4 7832 TCP *:imap (LISTEN)
imapd 3074 cyrus 4u IPv4 7832 TCP *:imap (LISTEN)
143端口的确有程序在使用
[其他解释]
用下面的命令把他们全部杀掉!然后再启动dovecot
lsof -i tcp:22
[其他解释]
sed "1d"
[其他解释]
xargs kill -9
[其他解释]
sed "1d"
[其他解释]
写错了
lsof -i tcp:143
[其他解释]
xargs kill -9
[其他解释]
awk '{print $2}'
[其他解释]
杀掉之后再重新激活的话 用什么命令?
[其他解释]
肥脸师傅 正解。
[其他解释]
杀得好艰难啊。。。呵呵~
[其他解释]
Jul 1 10:19:36 mail dovecot: child 3310 (auth) returned error 127Jul 1 10:20:35 mail sendmail[3321]: AUTH=server, relay=[116.226.49.94], authid=shishang, mech=LOGIN, bits=0Jul 1 10:20:36 mail sendmail[3321]: o612KZVH003321: from=<shishang@shishanglife.com>, size=321, class=0, nrcpts=1, msgid=<201007011019263125817@shishanglife.com>, proto=ESMTP, daemon=MTA, relay=[116.226.49.94]Jul 1 10:20:36 mail sendmail[3322]: o612KZVH003321: to=<shishang@shishanglife.com>, ctladdr=<shishang@shishanglife.com> (7798/509), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30531, dsn=2.0.0, stat=SentJul 1 10:25:46 mail dovecot: Dovecot v1.0.7 starting upJul 1 10:25:46 mail dovecot: auth(default): dovecot-auth: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
Jul 1 10:25:46 mail dovecot: Auth process died too early - shutting down
Jul 1 10:25:46 mail dovecot: child 3367 (auth) returned error 127
[其他解释]
Jul 1 10:19:32 mail dovecot: Dovecot v1.0.7 starting upJul 1 10:19:32 mail dovecot: Auth process died too early - shutting down
Jul 1 10:19:32 mail dovecot: auth(default): dovecot-auth: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
Jul 1 10:19:32 mail dovecot: child 3299 (auth) returned error 127
Jul 1 10:19:36 mail dovecot: Dovecot v1.0.7 starting up
Jul 1 10:19:36 mail dovecot: auth(default): dovecot-auth: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
Jul 1 10:19:36 mail dovecot: Auth process died too early - shutting down
Jul 1 10:19:36 mail dovecot: child 3310 (auth) returned error 127
Jul 1 10:20:35 mail sendmail[3321]: AUTH=server, relay=[116.226.49.94], authid=shishang, mech=LOGIN, bits=0
Jul 1 10:20:36 mail sendmail[3321]: o612KZVH003321: from=<shishang@shishanglife.com>, size=321, class=0, nrcpts=1, msgid=<201007011019263125817@shishanglife.com>, proto=ESMTP, daemon=MTA, relay=[116.226.49.94]
Jul 1 10:20:36 mail sendmail[3322]: o612KZVH003321: to=<shishang@shishanglife.com>, ctladdr=<shishang@shishanglife.com> (7798/509), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30531, dsn=2.0.0, stat=Sent
Jul 1 10:25:46 mail dovecot: Dovecot v1.0.7 starting up
Jul 1 10:25:46 mail dovecot: auth(default): dovecot-auth: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
Jul 1 10:25:46 mail dovecot: Auth process died too early - shutting down
Jul 1 10:25:46 mail dovecot: child 3367 (auth) returned error 127
[其他解释]
在 /usr/local/myql/lib/里有libmysqlclient.so 和libmysqlclient.so.15
[其他解释]
都忘记问你是什么系统了
直接安装一下mysql client就可以了
[其他解释]
我的mysql也是解压后直接运行的那种。呵呵~ 实在不行,真的重装了
[其他解释]
libmysqlclient.so有这个文件 路径再哪儿
有libmysqlclient.so.15这个文件吗?
如果没有
ln -s /path/libmysqlclient.so /path/libmysqlclient.so.15
[其他解释]
熊猫兄果然厉害!!!!!!!!!
IMAP服务器可以了!!!
就剩下查找imap邮件夹目录了。哈哈!!!90%做好了!!!
[其他解释]
继续努力吧!
[其他解释]
把
/usr/local/mysql/lib/
追加到
/etc/ld.so.conf
里
注意 前面别加include
然后执行ldconfig
然后再重启dovecot
[其他解释]
也就是说/etc/ld.so.conf内容应该是类似这样的
include ld.so.conf.d/*.conf
/usr/local/mysql/lib
然后执行ldconfig
[其他解释]
设置成 mail_location = maildir:~/Maildir
然后在账户下自动生成了收件箱,但是还是收不到邮件,原因如下:
Internal error occurred. Refer to server log for more information
继续找!!!
[其他解释]
Jul 1 11:39:58 mail dovecot: IMAP(life): Disconnected: Logged outJul 1 11:40:02 mail dovecot: imap-login: Login: user=<life>, method=PLAIN, rip=116.226.49.94, lip=192.168.1.110
[其他解释]
Jul 1 11:23:41 mail dovecot: IMAP(life): mkdir(/var/mail//Maildir/cur) failed: Permission denied
Jul 1 11:23:41 mail dovecot: imap-login: Login: user=<life>, method=PLAIN, rip=116.226.49.94, lip=192.168.1.110
Jul 1 11:23:41 mail dovecot: IMAP(life): mkdir(/var/mail//Maildir/cur) failed: Permission denied
Jul 1 11:23:41 mail dovecot: IMAP(life): Disconnected in IDLE
日志,继续搜
[其他解释]
跟imap设置是否有牵连?比如imapd.conf之类的
[其他解释]
那应该是MailDir格式是正确的 现在主要是在收信这里
我暂时想不出问题的所在
[其他解释]
你把pop3添加上 用pop3测试一下试试
[其他解释]
但是这是什么??
[root@mail ~]# mail -u life
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/life": 7 messages 7 unread
>U 1 root@mail.shishangli Thu Jul 1 13:40 18/642 "dawdaw"
U 2 hero0524@126.com Thu Jul 1 14:04 45/2022 "Re:d"
U 3 MAILER-DAEMON@mail.s Thu Jul 1 14:19 94/3251 "Returned mail: see tr"
U 4 hero0524@126.com Thu Jul 1 14:20 45/2019 "Re:d"
U 5 helanyaoshu@163.com Thu Jul 1 14:21 38/1440 "test"
U 6 80755890@qq.com Thu Jul 1 14:22 75/3457 "=?gbk?B?u9i4tKO6MTEx?"
U 7 root@mail.shishangli Thu Jul 1 14:35 17/663 "dwadwa"
&
[其他解释]
莫非客户端屏蔽了邮件查看????
[其他解释]
[root@mail ~]# mail -u life
你这个命令直接列出邮件 没用通过Dovecot吧
用outlook 和我刚才直接在命令行里登陆你的110端口 都是通过dovecot取得邮件
所以判断dovecot配置的有问题的可能性大
[其他解释]
我在网上找找conf配置文件,从头到尾都读一遍看看,我就不信整不出来!
[其他解释]
你给 life@shishanglife.com
发封信!
[其他解释]
发了,再说里面本来就有几封邮件
[其他解释]
# 1.0.7: /etc/dovecot.conf
protocols: pop3 imap imaps pop3s
listen: [*]
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_privileged_group: shishanglife
mail_location: maildir:~/%u
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
passdb:
driver: pam
userdb:
driver: passwd
[其他解释]
你把关于这个的设置 去掉试试
mail_privileged_group: shishanglife
[其他解释]
这是我练习的时候的dovecot配置 我采用的ldap认证 所以后面那点不用看
# 1.0.7: /etc/dovecot.conf
protocols: imap pop3
ssl_disable: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:~/MailDir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %v-%u
auth default:
passdb:
driver: ldap
args: /etc/dovecot-ldap.conf
userdb:
driver: ldap
args: /etc/dovecot-ldap.conf
[其他解释]
恩 去掉了,
按照http://www.liupangzi.org/doc/dovecot_wiki/Basic_Configuration.html 和http://hi.baidu.com/boweb/blog/item/35979bb1d8545c50092302f7.html都试过了。。。
[其他解释]
sendmail吧邮件投递到了mbox格式的邮箱里
而dovecot的配置是去MailDir格式的邮箱里取邮件
[其他解释]