centos7 dovecot 如何只使用imaps的同时禁用imap
时间: 2024-02-21 21:57:18 浏览: 21
如果你想仅使用 IMAP over SSL(即 imaps)并禁用普通的 IMAP 方法,可以按照以下步骤操作:
1. 编辑 dovecot 配置文件 /etc/dovecot/conf.d/10-master.conf。
2. 找到以下行:
```
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
```
3. 将 “inet_listener imap” 注释掉或删除,如下所示:
```
service imap-login {
#inet_listener imap {
# port = 143
#}
inet_listener imaps {
port = 993
ssl = yes
}
}
```
4. 保存并关闭文件,然后重启 dovecot 服务:
```
systemctl restart dovecot.service
```
现在,只有 IMAP over SSL(即 imaps)方法可以用于连接到你的服务器,普通的 IMAP 方法将被禁用。
相关问题
centos7 dovecot 如何禁用imap使用imaps
如果你想禁用 IMAP over SSL(即 imaps),可以按照以下步骤操作:
1. 编辑 dovecot 配置文件 /etc/dovecot/conf.d/10-master.conf。
2. 找到以下行:
```
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
```
3. 将 “ssl = yes” 修改为 “ssl = no”,如下所示:
```
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = no
}
}
```
4. 保存并关闭文件,然后重启 dovecot 服务:
```
systemctl restart dovecot.service
```
这将禁用 imaps,只有普通的 IMAP 方法可以用于连接到你的服务器。
centos7 dovecot 如何禁用非加密的imap。
要禁用非加密的 IMAP,你可以按照以下步骤操作:
1. 编辑 dovecot 配置文件 /etc/dovecot/conf.d/10-auth.conf,找到以下行:
```
auth_mechanisms = plain login
```
2. 将上述行修改为:
```
auth_mechanisms = plain login cram-md5 digest-md5
```
这将只允许使用 CRAM-MD5、DIGEST-MD5 和加密的登录方法进行身份验证。
3. 保存并关闭文件,然后重启 dovecot 服务:
```
systemctl restart dovecot.service
```
现在,非加密的 IMAP 将被禁用,只有加密的 IMAP 方法才能用于连接到你的服务器。