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/RestrictAccessIf you still have problem let us know. Best of Luck