LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-06-2007, 09:55 AM   #1
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
change default location of sendmail users mailbox


Hi all:
Is there any way to change the default mail delivery location from /var/spool/mail/username to each users home directory like /home/usename.
Because I want to setup mailbox quota on them and tried quota settings in /var but it didn't worked. Now if I can change the default mail delivery location then I just have to setup quota in /home which is very easy.

Please let me know.

Thanks in advance.
 
Old 03-06-2007, 10:26 AM   #2
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
I found that the enviroment value $MAIL contains the value where to post the mail. may be changing this value to $HOME/$USER will do the trick.
Please let me know.
 
Old 03-06-2007, 10:50 AM   #3
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
I have changed the value of MAIL to MAIL="/home/$USER" where it was written as MAIL="/var/spool/mail/$USER" in /etc/profile.

But it didn't worked as I expected. Now it not even send mail in /var/spool/mail. What could be wrong?
Sending mail locally using
# mail -v user1
and its saying status is sent so everything seems fine though.
 
Old 04-30-2007, 05:41 AM   #4
nics
Member
 
Registered: Mar 2007
Posts: 31

Rep: Reputation: 15
u can try this

Quote:
Originally Posted by tanveer
I have changed the value of MAIL to MAIL="/home/$USER" where it was written as MAIL="/var/spool/mail/$USER" in /etc/profile.

But it didn't worked as I expected. Now it not even send mail in /var/spool/mail. What could be wrong?
Sending mail locally using
# mail -v user1
and its saying status is sent so everything seems fine though.
set quota on /var partition as mailbox is in /var/spool/mail.then change the home directory while addidg new users to /var by going to /etc/default/useradd. and changing HOME=/var.. for already existing users. do "mv /home/user /var/user" and change their home directory to /var...
hope it works
 
Old 05-03-2007, 11:42 PM   #5
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
hi thanks for your reply.
I solved that without changing the default location of users that is /home. Just setup disk quota on /var and it handled the quota for users mailboxes. Now trying to send a bounce message to sender if users quota full.

Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail - Internal mail from linux box not getting to users mailbox Discard Linux - Distributions 6 02-20-2007 12:49 PM
postfix mailbox location yogaboy Linux - Software 5 12-19-2006 06:37 PM
Thunderbird mailbox location AllanB Linux - General 1 12-10-2006 11:13 PM
how to change the path of mailbox storage in sendmail dhanju Linux - Newbie 0 09-15-2005 12:41 AM
how to change the default mail delivery location mnisski Linux - General 3 10-21-2003 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration