I've a mail server running the stock imapd from UW on a Sparc running
Solaris 7. For the client side, I'm using Netscape communicator for
accessing mail.
All works fine as is. However, I plan to change the default location of
the mail INBOX on the Sparc for all users and place them individually in
the user' home directories. In other words, the usual place for
incoming mail is /var/mail/$USER and I want to change it to something
like /usr/home/$USER/mail. I do not find any way to specify that on the
Netscape mail client so I assume that it has got something to do with
imapd or Solaris.
I have tried the following: I modified the system wide init files
(/etc/profile and /etc/.login) to have the enviroment variable MAIL={new
location of inbox}. This seems to work for the /bin/mail program as it
does check the enviroment values. However, with a imapd client, nothing
seems to change; the client still looks in /var/mail/$USER for the
mail.
So my question is: How do I get the imapd client to know that the
default location for incoming mail is changed and point to the new
location?
I'm sure this is a common route taken by many sys admins but I don't
seem to be able to do it. I've searched around quite a bit but can't
locate information on this. I'll appreciate if you could point me to the
right direction or have any other advice.
Thanks
Dennis
For UW imapd, look in a file called env_unix.c . Look for the
macro MAILSPOOL used in an sprintf statement. Change the sprintf
statement to use the desired path to the mail spool. Then recompile
and reinstall.
--
------------------------------------------------------------------------
Timothy J. Lee timlee@
Unsolicited bulk or commercial email is not welcome. netcom.com
No warranty of any kind is provided with this message.
--Jauder
Dennis Khaw wrote:
>
> Hi everyone,
>
> I've a mail server running the stock imapd from UW on a Sparc running
> Solaris 7. For the client side, I'm using Netscape communicator for
> accessing mail.
>
> All works fine as is. However, I plan to change the default location of
> the mail INBOX on the Sparc for all users and place them individually in
> the user' home directories. In other words, the usual place for
> incoming mail is /var/mail/$USER and I want to change it to something
> like /usr/home/$USER/mail. I do not find any way to specify that on the
> Netscape mail client so I assume that it has got something to do with
> imapd or Solaris.
>
> I have tried the following: I modified the system wide init files
> (/etc/profile and /etc/.login) to have the enviroment variable MAIL={new
> location of inbox}. This seems to work for the /bin/mail program as it
> does check the enviroment values. However, with a imapd client, nothing
> seems to change; the client still looks in /var/mail/$USER for the
> mail.
>
> So my question is: How do I get the imapd client to know that the
> default location for incoming mail is changed and point to the new
> location?
>
Try the Netscape Tech Support Site [http://help.netscape.com], the
Netscape Unofficial FAQ [http://www.ufaq.org], or the Netscape
Communicator for Unix
[snews://secnews.netscape.com/netscape.communicator.unix] or Netscape
General [news:netscape.public.general] newsgroups. The
netscape.public.mozilla.* groups are intended for development on the
open-source version of Navigator, called Mozilla
[http://www.mozilla.org].
Jim Cape
http://www.jcinteractive.com
"All animals are equal, some animals
are more equal than others."
-- George Orwell, Animal Farm
The default location is in the IMAP source code, I believe in env_unix.c.
However, you may be able to save the grief: most email packages also
know about $homedir/mbox, and if you "touch" that file in every user's
home directory, set it to chmod 600, chown $user, mail will
automatically be passwd from $mailspooldir/$USER to $homedir/mbox when
they log in.
>So my question is: How do I get the imapd client to know that the
>default location for incoming mail is changed and point to the new
>location?
Edit the imapd source, or use the "mbox" trick.
--
That still doesn't solve the basic underlying problem: When you have
more than around 15K-20K mailboxes in a common mail spool dir, all the
accesses to that dir become slow.
The method you suggest will keep the mailboxes in the common mail
spool dir small, but the deliveries into the common spool dir by
the MTA and the fetches from the common spool dir by the IMAP daemon
will still be slowed.
You can combat the problem by spreading the mailboxes among several
subdirectories with "hashing" algorithms, or you can put the mailboxes
into the users' home directories.
-Greg
Thanks Everyone! Really appreciated the quick advice and suggestions.
:-)
Yes, as suggested, I modified the env_unix.c such that the default inbox
location would instead point to a new defined location in the users'
home directory. Modifying this file works great because our users use
both imapd client and PINE, which depend on env_unix.c for their default
enviroments.. So now both PINE users and Netscape users would
automatically have the same newly defined inbox when they login . To get
the mail delivered to the user' home directory, I simply used Procmail
as my local mail delivery agent. Everything works great now and exactly
what we need.
Once again, Thanks alot!
Dennis