Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Change Mail Spool Directory

By default, my SGI writes incoming mail to /usr/mail. Suppose the disk space here is limited and I want to write mail elsewhere e.g. /sparedisk. Is there any way I can get sendmail to do this?

I have looked in the Costales book 'Sendmail', but I can't find a reference.

Can anyone think of a hack? e.g. links

Thanks in advance
0
cpranderia
Asked:
cpranderia
1 Solution
 
vkg063097Commented:
1. look at this in sendmail.cf

# queue directory
O QueueDirectory=/var/spool/mqueue

2. make a link to /sparedisk from /usr/mail
0
 
cpranderiaAuthor Commented:
Hi,

I'm afraid I don't think you've answered my question. You have shown me how to specify the queue directory, not the spool directory. Yes, it is easy to re-define where sendmail puts its outbound mail using OQ in sendmail.cf. However, I wanted to know how to change the location of the spool directory where mail being delivered _to_ my machine is being placed.
0
 
rbrCommented:
Copy all your folders from /usr/mail to /sparedisk
remove all contents of /usr/mail
ln -S /sparedisk /usr/mail
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
cpranderiaAuthor Commented:
Thanks for the answer. That's the 'hack' way of doing it I suppose, But there is no way to configure this in sendmail?

By the way, shouldn't it be 'ln -s' (small s) and shouldn't the target be /sparedisk and the file being copied /usr/mail. i.e.

'ln -s /usr/mail /sparedisk'
0
 
ozoCommented:
Isn't that the job of the delivery agent?
What do you have in
Mlocal

0
 
cpranderiaAuthor Commented:
Yes, I suppose it is the job of the delivery agent. Does that mean it is the configuration of that I must change?

Mlocal points to a /usr/lib/mail.local i.e.

Mlocal P=/usr/lib/mail.local, F=flsSDFMmnp, s=10, r=20, A=mail.local, -d $u
0
 
vkg063097Commented:
Yup,
mails in /usr/mail are being appended by delivery agent.
normally /bin/mail. It may be something else in your
machine. /usr/mail path may be hardcoded in these program.
You need to recompile it with different path depending upon
the delivery agent you are using.
/bin/mail as "f" option that defines the mailbox path.
Pls note that if you do this you may need to change this
path in your frontend mail readers also.
0
 
cpranderiaAuthor Commented:
In that case, it is probably easier to go the 'links' way. What however are the implocations for other linked directories e.g. /usr/mail is also linked to /var/mail?


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now