General
cancel
Showing results for 
Search instead for 
Did you mean: 

incomplete mails in mailbox when using disk quotas

Fritz MAYER
Advisor

incomplete mails in mailbox when using disk quotas

When using disk quotas in file system /var/mail it happens that mails are written incompletly in mailbox file. The MDA rmail writes as long to mailbox file as the quota limit is not reached. When the limit is reached the mail remains with incomplete contents in the mailbox file. (It does not make a difference which MDA is used, procmail for instance behaves the same way.). Indeed the sender receives an error message

mail: cannot append to /var/mail/fmayer
mail: cannot create dead.letter
451 I/O error

that the mail could not be delivered and the mail is queued for 5 days as usual. I encountered this annoying effect in HP-UX 10.20, 11.0 and 11.i. Until now I have been using a wrapper around rmail which checks in advance whether the mail will fit into the mailbox. But I can't believe that there is no more elegant solution to this problem managed by HP-UX itself. Does anybody know a better solution?

Regards,
Fritz
3 REPLIES
G. Vrijhoeven
Honored Contributor

Re: incomplete mails in mailbox when using disk quotas

Frits,

Use soft quota's

Gideon
Robert-Jan Goossens
Honored Contributor

Re: incomplete mails in mailbox when using disk quotas

Fritz,

Yes if soft and hard quota's are the same this will happen. We solved this using 5 mb difference between soft and hard quota on /var.

Robert-Jan.
Christopher Caldwell
Honored Contributor

Re: incomplete mails in mailbox when using disk quotas

The wrapper is the right way to go - the key is putting the smarts in the wrapper and laying out the filesystems correctly (especially if you want to change a quota violation from a temp failure (4XX to a permanent failure).

Make
/var/mail
and
/var/spool/mqueue
separate filesystems.

Add quotas /var/mail.
Space out hard quota and soft quota limits.
Write a wrapper to bounce mail on soft quota violation (either via direct interrogation or by looking for mailbox bytes available).