[Dovecot] Blocked

Joseph Tam tam at math.ubc.ca
Sat Dec 9 01:32:11 UTC 2006


On Fri, 8 Dec 2006, dovecot-request at dovecot.org wrote:

> Date: Fri, 08 Dec 2006 12:33:04 +0100
> From: Jos Chrispijn <jos at webrz.net>
> Subject: Re: [Dovecot] Blocked
>
> ...
> I block pop3 to force my users to use webmail (that is in fact using IMAP).
> What mechanism should trigger sending a message that pop3 is blocked?
> Once this message is send, it is either send by postfix to alternative
> email account (Postfix forward) or just read once thru Webmail. In the
> mean time this user is trying to establish pop3 on a 24/7 basis $-)

If you are not selective on which users get the message (i.e. you want this
notice to go out to all POP users), then you can do what the previous poster
said and make a read-only mailbox and redirect the user's INBOX to this 
file (via symlinks, or dovecot.conf or what-have-you).  This is probably
the easier route.

Another easy solution might to use tcp-wrappers and reply to all connections
to port 110 with

 	-ERR Please contact ...

Some (most?) mail readers will pop this message to the user.

Another solution which I employed (for another reason) is to make your
own mini-dameon which enters into a fake POP session.  Just allow any
authentication information and server up your fake notice.  The POP3 protocol
is fairly simple and you only have to implement a small subset of commands:
user(noop), pass(noop), list, stat, retr, top, rset(noop), noop(noop), dele(noop), quit.

I return a "OK" for most of these commands and most of them are noops.

I wrote a patch for qpopper to do this but you could probably modify the
source to make it a stand-alone server:

 	http://www.math.ubc.ca/~tam/Software/Qpopper.M2W/m2w.patch

For the curious, the reason why I had to make this bizarre patch:

 	http://www.math.ubc.ca/~tam/Software/Qpopper.M2W/

Joseph Tam <tam at math.ubc.ca>


More information about the dovecot mailing list