我正在尝试登录Roundcube,但程序不允许。
我可以登录到上述帐户从外壳和邮件设置,并在我的服务器上为用户'admin‘正常工作。RC才是问题所在。如果我检查我的日志:
/usr/local/www/roundcube/logs/errors
它们显示:
[21-Sep-2013 17:19:02 +0100]: IMAP Error: Login failed for admin from ip.ip.ip.ip. Could not connect to ip.ip.ip.ip:143:
Connection refused in /usr/local/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184
(POST /roundcube/?_task=login&_action=login)
这并没有给我太多的线索,只是引导我:
public function connect($host, $user, $pass, $port=143, $use_ssl=null) {}
从…
rcube_imap.php
我试过的东西,编辑:
/usr/local/www/roundcube/config/main.inc.php
通过以下方式:
// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null to use
// best server supported one)
//$rcmail_config['imap_auth_type'] = LOGIN;
$rcmail_config['imap_auth_type'] = null;
// Log IMAP conversation to <log_dir>/imap or to syslog
$rcmail_config['imap_debug'] = /var/log/imap;
登录尝试失败
/var/log/imap
甚至都没写过,没有给我留下任何线索。我在一个拥有完全根访问权限的FreeBSD机器上使用了dovecot和Sendmail。这肯定不是错误的用户名密码组合。
在字符串“Roundcube:连接到存储服务器失败”上的几次谷歌搜索都是徒劳的。
编辑:
我需要一个条目
/etc/rc.conf
dovecot_enable="YES"
学童的错误。
发布于 2020-04-08 03:31:27
我在letsencrypt证书上遇到了同样的问题,并通过禁用对等身份验证来解决它:
$config['imap_conn_options'] = array(
'ssl' => array('verify_peer' => true, 'verfify_peer_name' => false),
'tls' => array('verify_peer' => true, 'verfify_peer_name' => false),
);
然后,您可以像这样设置连接字符串(starttls):
$config['default_host'] = 'tls://your-host.tld';
$config['default_port'] = '143';
$config['smtp_server'] = 'tls://your-host.tld';
$config['smtp_port'] = '25';
或者像这样(ssl方法):
$config['default_host'] = 'ssl://your-host.tld';
$config['default_port'] = '993';
$config['smtp_server'] = 'ssl://your-host.tld';
$config['smtp_port'] = '587';
确保在连接字符串中使用证书的完全限定主机名(如-host.tld),而不是内部主机名(如localhost)。
希望这对其他人有帮助。
发布于 2013-11-01 11:13:21
将maildir更改为您的系统使用的任何内容。
将Dovecot mail_location设置更改为
mail_location = maildir:~/Mail
将后缀home_mailbox设置更改为
home_mailbox = Mail/
重启服务,即可轻松完成
发布于 2020-12-10 17:35:08
如果您运行fail2ban
,则dovecot
可能会在失败的Roundcube登录尝试后被禁止。这在我身上已经发生过两次了。
首先,检查是否真的是这样:
sudo fail2ban-client status dovecot
如果您得到类似以下内容的输出:
Status for the jail: dovecot
|- Filter
| |- Currently failed: 1
| |- Total failed: 8
| `- File list: /var/log/mail.log
`- Actions
|- Currently banned: 1
|- Total banned: 2
`- Banned IP list: X.X.X.X
也就是说,Currently banned
数字高于0,那么fail2ban
有点过于急切,你必须“解禁”dovecot
。
以交互模式运行fail2ban
客户端:
sudo fail2ban-client -i
在fail2ban>
提示符下输入以下内容:
set dovecot unbanip X.X.X.X
其中X.X.X.X
是您的Dovecot服务器的IP地址。
退出交互式客户端并再次运行sudo fail2ban-client status dovecot
。Currently banned:
字段现在的值应为0。更重要的是,RoundCube应该再次工作:-)
https://stackoverflow.com/questions/18942811
复制相似问题