Subject: Captive pop and imap accounts

From: "James Wilde" <[email-masked]>
Date: Thu, 16 Oct 2003 13:46:48 +0200

I just joined this list five minutes ago, and I've already had a message with a title that looks as though it handles a related topic.  But just in case, I'll fire this off, as the archives are still something of an unknown quantity.

What I would like to do is this:  set up a dummy server which accepts logins from all who use pop3 or imap protocols, and sends them one message - the same message to all.

The scenario resembles this one:  we are an ISP.  Customer doesn't pay the bill.  He gets routed to a captive server, from which we wish him to get one message: Pay your bill.  When bill is paid, he is no longer routed to that server.

I have half-managed it for imap clients, by creating a file /etc/imap.alert, which pops up during some login.  I'd like something similar which works for pop.  Ideally I'd like to be able to send a full message, but I'll settle for imap.alert's one liner.

All suggestions very welcome.

TIA

mvh/regards

James

Glocalnet - Sweden's best ISP
We're #3; we try harder!

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Rich Graves <[email-masked]>
Date: Thu, 16 Oct 2003 10:56:13 -0400 (EDT)

On Thu, 16 Oct 2003, James Wilde wrote:

> The scenario resembles this one:  we are an ISP.  Customer doesn't pay
> the bill.  He gets routed to a captive server, from which we wish him to
> get one message: Pay your bill.  When bill is paid, he is no longer
> routed to that server.

We have something somewhat similar.

Our systems are such that everyone in kerberos-land can successfully
authenticate to any of several IMAP servers, but home directories exist
only on the user's "home" server. We return a "Your mail is not on this
server"  inbox to clients configured for the wrong imap server.

-    myHomeDir = cpystr (home); /* set home directory */
+    sprintf (tmp,"/var/imap/%.1s/%s",myUserName,myUserName);
+    if (!stat (tmp,&sbuf) && (sbuf.st_mode & S_IFDIR)) {
+      myHomeDir = cpystr (tmp);
+    } else {
+      myHomeDir = ANONYMOUSHOME;
+      sysInbox = "/var/spool/mail/anonymous";
+    }

A read-only anonymous INBOX works fine for IMAP, and saves you from the
limitations of imapalert. However, POP3 appears to *require* a writeable
INBOX, so our POP3 users who log on to the "wrong" server get nothing. This 
is acceptable to us because we strongly recommend IMAP and refuse non-SSL 
POP3 logins (i.e., the default "Outlook Express wizard" doesn't work, they 
need to follow our directions to enable SSL, which usually succeeds in 
getting them to use IMAP), but you probably need POP3.

Suggestion: Break the incoming email alias for [email-masked], and install 
a cron job to replace /var/spool/mail/deadbeat with a writeable "pay your 
bill" mailbox once per day? This will allow both IMAP and POP3 to "work."
IMAP clients get the message once, POP3 clients get a new copy once per 
day.
-- 
Rich Graves <[email-masked]>
UNet Systems Administrator

---

From: "Chr. von Stuckrad" <[email-masked]>
Date: Fri, 17 Oct 2003 01:15:05 +0200

> INBOX, so our POP3 users who log on to the "wrong" server get nothing. This 

If pop requires a writable box, does it 'check' only,
or does it 'really write', before it sends contents?

We once tricked a program into accepting an unwritable
file by allowing the file itself to be writable, but
*mounting* it read only, so the check says OK, but
the real 'write' fails.

Just an idea to circumvent the problem (if possible)...

Stucki