RE: setting quotas. . .

2001-06-27 Thread Norvell Spearman

 I think you're confused.  From the man page for quotacheck:

Quotacheck should be run each time the  system  boots  and mounts
non-valid  file  systems.   This is most likely to happen
 after a system
crash.

 qmail won't be running that early in the boot, so it's not an issue.

 Charles

I'm probably confused; I've never set quotas on a Linux server before.  The
parts of the man page for quotacheck to which I was referring:

quotacheck expects each filesystem to be checked to have quota
files named aquota.user and aquota.group located at the root
of the associated file system.  If a file is not present, quotacheck
will create it.
...
It is strongly recommended to only run quotacheck with quotas turned
off and the filesystem unmounted or in read-only mode, or quota
corruption can occur. . .

I've never set quotas on this server before so I thought that I must first
run quotacheck to create the aquota.* files.  Since qmail will probably dump
at least one e-mail into somebody's Maildir while quotacheck is running I'm
at a loss as to how to keep qmail from delivering locally while still
accepting mail.

Thanks much.

---Norvell Spearman




Re: setting quotas. . .

2001-06-27 Thread Adrian Ho

On Wed, Jun 27, 2001 at 08:07:35AM -0500, Norvell Spearman wrote:
 I'm probably confused; I've never set quotas on a Linux server before.

Did you check out the other man pages listed in the SEE ALSO section of
the quotacheck man page?  If you didn't, you should have -- you would then
have discovered exactly what creates the quota.{user,group} files.  (Hint:
They're created when you turn quotas on.)

And if I read your requirements correctly, qmail already does what you
want, with no special configuration needed.  Read PIC.* and the relevant
qmail-* man pages (in this case, qmail-queue and qmail-send) to see why.

- Adrian



RE: setting quotas. . .

2001-06-27 Thread Norvell Spearman

 If the filesystem isn't mounted, then qmail isn't going to be
 delivering mail to it, is it?

So if I umount /home while qmail is up, will qmail barf or simply wait for
/home to be remounted?

 To run quotacheck, you should probably go to
 single user mode,
 unmount all unnecessary filesystems, etc.  When you do this, you
 aren't going
 to be running any unnecessary daemons (like qmail).

 Charles

I know single user mode would be best; I could do the quota stuff late at
night.  But what would happen if mail comes to the server and qmail isn't
running?  Does it simply bounce back to the sender, does the originating
smtp server keep trying for a while, or does all that depend on how the
destination mail server is configured?  I'm trying to avoid having my users
yell at me if they don't get an e-mail they're expecting, or if they can't
send e-mail out.  That's why I originally asked about whether qmail can
accept mail for delivery (local and remote) while not delivering mail
locally.

Thanks much for any help.

---Norvell Spearman




Re: setting quotas. . .

2001-06-27 Thread Charles Cazabon

Norvell Spearman [EMAIL PROTECTED] wrote:
  If the filesystem isn't mounted, then qmail isn't going to be
  delivering mail to it, is it?
 
 So if I umount /home while qmail is up, will qmail barf or simply wait for
 /home to be remounted?

You still don't get it.  Running quotacheck is something you do after a major
system failure, etc.  You do this from single user mode, before mounting other
filesystems, before starting networking at all, let alone network daemons.

On SysV-style systems, single user mode, where you do major system repairs and
whatnot, is runlevel 1.  Networking isn't enabled until you hit runlevel 3.
And things like qmail-send shouldn't be started until at _least_ runlevel 2,
preferably runlevel 3.

This has nothing whatsoever to do with qmail.  Take further questions about
quotacheck to the supportl list for your OS.

 I know single user mode would be best; I could do the quota stuff late at
 night.  But what would happen if mail comes to the server and qmail isn't
 running?

It's deferred.  The sender will try again later if they can't establish a
connection.  If you don't like that, pay someone to be a backup MX for you.

Charles
-- 
---
Charles Cazabon[EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
---



Re: setting quotas. . .

2001-06-27 Thread Greg White

On Wed, Jun 27, 2001 at 10:38:28AM -0500, Norvell Spearman wrote:
 I know single user mode would be best; I could do the quota stuff late at
 night.  But what would happen if mail comes to the server and qmail isn't
 running?  Does it simply bounce back to the sender, does the originating
 smtp server keep trying for a while, or does all that depend on how the
 destination mail server is configured?


Unless the sending mail server is completely broken, it will queue and
retry.


 I'm trying to avoid having my users
 yell at me if they don't get an e-mail they're expecting, or if they can't
 send e-mail out.  That's why I originally asked about whether qmail can
 accept mail for delivery (local and remote) while not delivering mail
 locally.
 

svc -d /service/qmail-send will allow qmail to accept mail via SMTP and
queue it, but not deliver it.

Making all possible delivery directories sticky will postpone all
deliveries.

IMHO, single-user mode, unmount filesystem, set up quotas, back to
multiuser mode is probably your best bet. Your odds of losing any mail
during this transaction are extremely low, unless the sending mail
servers are totally useless...

-- 
Greg White



RE: setting quotas. . .

2001-06-27 Thread Norvell Spearman

 Did you check out the other man pages listed in the SEE ALSO section of
 the quotacheck man page?  If you didn't, you should have -- you would then
 have discovered exactly what creates the quota.{user,group} files.  (Hint:
 They're created when you turn quotas on.)

 - Adrian

I must be reading different man pages than yours.  The quotaon man page is
referred to in quotacheck's man page.  This is what I read from
`man quotaon`:

  NAME
  quotaon - turn file system quotas on and off
  . . .
  quotaon expects quota files to be present in the root directory
  of the specified file system and be named aquota.user
  for user quota or aquota.group for group quota. These files can
  be created either by converting old quota files with
  convertquota(8) or by quotacheck(8)
  which creates completely new files.
  ^^*

Then quotacheck's man page:

  quotacheck expects each filesystem to be checked to have quota
  files named aquota.user and aquota.group located at the root
  of the associated filesystem.  If a file is not present,
  quotacheck will create it.
  ^*
  . . .
  It is strongly recommended to only run quotacheck with quotas
  turned off and the filesystem unmounted or in read-only mode, or
  quota corruption can occur.

So what creates the quota files besides quotacheck?  Thanks for your help
and all apologies for straying off this list's theme. . .

---Norvell
__
*Annoying ASCII emphasis added by message's author




RE: setting quotas. . .

2001-06-27 Thread Norvell Spearman

 IMHO, single-user mode, unmount filesystem, set up quotas, back to
 multiuser mode is probably your best bet. Your odds of losing any mail
 during this transaction are extremely low, unless the sending mail
 servers are totally useless...

 Greg White

Thanks very much.

I would like to apologize to the entire list---as I have to Charles
Cazabon---for any irrelevant postings and for taking up the list's time and
resources.  My original question had to do with setting quotas on /home and
how qmail would react if /home suddenly wasn't available.  But I must have
worded my questions terribly.  Thanks to Adrian Ho for pointing me to the
PIC.* files.  I will definitely RTFM more closely next time and hopefully
not be a bother.

---Norvell Spearman




Re: setting quotas. . .

2001-06-26 Thread Charles Cazabon

Norvell Spearman [EMAIL PROTECTED] wrote:
 Is there a way for qmail to accept mail but not deliver it temporarily (to
 local users)?  I'd like to set quotas for the users' home directories and
 according the documentation I read the filesystem can't have anything
 writing to it while quotacheck is running.  I'm running Linux-2.4.3-20 with
 ext2 file systems, if matters.

I think you're confused.  From the man page for quotacheck:

   Quotacheck should be run each time the  system  boots  and mounts
   non-valid  file  systems.   This is most likely to happen after a system
   crash.  

qmail won't be running that early in the boot, so it's not an issue.

Charles
-- 
---
Charles Cazabon[EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
---