On Tue, Nov 28, 2000 at 12:01:48PM +0200, tag wrote:
> Hi ALL,
>
> Is it possible to simulate pop3 conections to a mail server and
> authenticate the user and tell that user that he has no mail ??
>
> The reasoning behind this is I want a temp backup server that can take
> the pop3 strain while I make some modifications to the main mail server
> ??
Yes it is. And quite easy too. All you need to do is replace checkpassword
with an dummy program that changes to an innocuous home directory that has
an empty Maildir (assuming the usual Maildir in home).
A good idea is to have a look at the existing checkpassword.c, but essentially
all you need your replacement checkpassword to do is:
#! /bin/sh
cd /home/dummy
exec $*
And that's it! Of course you need an empty Maildir in /home/dummy.
This replacement checkpassword simply ignores the user and password retreived
by qmail-popup - but do you care whether they get their password right or
wrong during this maintenance period? They only see an empty mailbox regardless.
As an added precaution, you should also setuid and setgid away from root,
but you can achieve this by having a different invocation of tcpserver.
Regards.