艾瑞克的 Hexo 空間

[筆記] Dovecot 拒絕特定使用者連線IMAP/POP3 / Reject specified user to connect IMAP/POP3 in dovecot

本文發表於1473天之前,文章內容可能已經過時,如有疑問,請聯繫作者。





If users having static IP Addresses on their machines, Yes it is possible with iptables. Just apply following command can restrict the user to access POP3 and IMAP:# iptables -t filter -I INPUT -s <user’s IP Address> -p tcp –dport 110 -d <mail server IP> -j REJECT (or DROP)
# iptables -t filter -I INPUT -s <user’s IP Address> -p tcp –dport 143 -d <mail server IP> -j REJECT (or DROP)

Dont use Mail server IP in case of mail server hosted on this machine.

You can also deny the users in pop3 and imap server like if you have dovecot just remove the comment from following lines in dovecot.conf file. Create files and restart dovecot,

1.)


>
passdb passwd-file {
>
> File contains a list of usernames, one per line
>
> args = /etc/dovecot.deny
>
> deny = yes
>
> }

2.) Create /etc/dovecot.deny file and add username inside to the file.for more help on dovecot go through the following link : http://wiki.dovecot.org/Authentication/RestrictAccess


avatar
[筆記] Freebsd ports安裝 dbus 會發生 dbus pw: user 'messagebus' already exists freebsd 的錯誤