PDA

View Full Version : Email Account: Disable IMAP only for remote access


ignasigarcia
21st April 2009, 11:21
Hi there. I'd like to have IMAP access disabled for some users thorugh ISPC3 control panel. However, we have squirrelmail installed in the same server for webmail access. Is there a way to allow universal access to the IMAP server in localhost and disable IMAP access when login remotely (i.e. from thunderbird, outlook)? If the answer is no, is there any workaround for accomplishing this?

Thanks in advance

Ignacio

tebokkel
21st April 2009, 14:49
The term "firewall" comes to mind..

Otherwise, set the binding IP-address from your IMAP-server to localhost or 127.0.0.1.

For Courier-IMAP that is, change/put:
ADDRESS=127.0.0.1

in your /etc/courier/imapd (and/or imapd-ssl).

Make sure your squirrelmail is connecting to 127.0.0.1, not to your external IP.

Why on earth you would want to limit users in this way, I wouldn't know.

Paul

ignasigarcia
21st April 2009, 17:17
yes, that would work if I did not want any user to access through IMAP remotely. What I was talking about is not giving SOME users remote IMAP access, but still access with POP3 and WebMail.

Ignacio

tebokkel
21st April 2009, 17:41
Then you'll need PAM, I think. For example adding a file-module to the imapd PAM-stack/service, see
http://linux.die.net/man/8/pam_listfile

However, since you're probably using ISPC 3, which I haven't tried yet, it's very likely that the PAM-config for Courier authdaemon has changed from authpam to authmysql, so you need to daisychain the authdaemon modules (which is documented to be possible). In any case you'll still need to administer "something", "somewhere" for either your imap-users or your non-imap users.

Paul