having username as part of the IMAP servername

bob.reven@unix1.trinity.ox.ac.uk bob.reven@unix1.trinity.ox.ac.uk
Fri, 03 Aug 2001 09:27:40 +0100 (BST)


at this university the central computing services have set up a cluster
of IMAP servers. when a student is registered for email a DNS alias is
created in the form username.herald.ox.ac.uk which points to whichever
particular IMAP server they happen to be on. 

eg, an nslookup of trin0450.herald.ox.ac.uk shows that user trin0450
is actually on imap5.herald.ox.ac.uk. 

users are then instructed to configure their IMAP clients with an IMAP
server of username.herald.ox.ac.uk which has the advantage that users
can be moved around from busy nodes to quiet nodes etc, without the user
even knowing or suffering any noticeable loss of service

in our small corner of the university I would like to setup an IMP server
but have come unstuck trying to define a server. i could just leave it blank 
so users fill it in themselves but i would much prefer to be able to make
IMP take the username and add it to a predefined string ie, .herald.ox.ac.uk
and use that as the server name. i have tried a few crude attempts but
failed. 

can anyone with more detailed knowledge of PHP and IMP suggest how this
could be achieved with either 2.2.6 or 2.3.7

many thanks

sincerely,

bob reven