Postmaster Guidelines and Procedures

Too Large Mailbox/Messages

 
Introduction: Messages, with accompanying attachments, are limited 9 megabytes on our system. The postmaster's mailbox can become too large when messages over this size become failed mail.

If the postmaster's mailbox becomes too large, the following can happen:

  • No new messages for it will be allowed (resulting in failed mail notifications for our postmaster
    address - not a good situation for our customers and a violation of an RFC about postmaster mailboxes).
  • There can difficulty with delivery of messages to other addresses and if the disk completely fills, a system crash could be possible.
Indicators of too large mailbox:
  1. Use the command uptime when you first login to postmaster.

    It will provide results similar to:

    8:48am up 206 day(s), 1:05, 11 users, load average: 4.06, 4.12, 3.67

    If the first number after load average is above 50, you need to find someone in Network Systems (preferably Brian Cadieux or Jeff Collyer) and let them know that the load on the mail hub seems high.

  2. Next, use the command cksize

    which produces results similar to:

    -rw-r--r-- 1 upostmst other 1045640 Oct 31 08:50 /usr/mmdf/sysmail/postmaster

    The number after "other" shows the relative size of the postmaster's mailbox. This mailbox is just over 1 MB, which is usually not problematic, but could indicate a message with a large attachment.

  3. You receive a message about "no space left on device".

  4. If none of the above has indicated a large mailbox on postmaster, but later in the session you notice extreme slowness updating or reading messages, is it likely a large message has arrived while you are processing messages. Issue the cksize command to determine mailbox size, then follow the instructions for processing the large messages causing the slowness.
Processing (expanded version):
  1. If needed, open the postmaster's mailbox in read-only mode using

    mail -rf /usr/mmdf/sysmail/postmaster.

  2. Scan the postmaster's mailbox for messages with more than 1000 lines by using the h command (headers), or h followed by the number of the first of the messages you wish to scan. For example, h38 shows headers of messages 38 to 55.

    For example, h119 would show in part:

    119 N "Mystery Science Th" Oct 31 8:45 (3010 lines) Fwd: Osteoporosis dads e
    120 N TO: postmaster@regis Oct 31 8:38 (71 lines) Suspicious attachment re
    121 N TO: vassist@virginia Oct 31 8:43 (25 lines) Disconnects for 10/31
    122 N TO: postmaster@rcn.c Oct 31 8:44 (73 lines) Suspicious attachment re
    123 N "mail.virginia.edu M Oct 31 8:45 (252 lines) Failed mail (msg.aa1089
    124 N "mail.virginia.edu M Oct 31 8:46 (2842 lines) Failed mail (msg.aa1182

    Messages 119 and 124 are large ones, and should be processed using the ml (mail large) utility, described in the next several steps.

  3. If needed, save each message to its own ml mailbox. The mailbox name must begin with ml, and be followed by a number unique to that message for that postmaster session.

    For example,

    s 119 ml1
    s 124 ml2


    Note: each message must be in its own mailbox.


    Note: if there is no room for saving the files in the postmaster's space, you can save them to the /tmp directory, as in s 119 /tmp/ml1, but remember that if the mailhub crashes, everything in /tmp goes away ...

  4. Save the non-large messages to a new mailbox. You may use a name similar to mbox.todo.

    For example,

    s 120-123 mbox.todo
    etc.
    Note: all of these messages are usually saved to one mailbox.

    Note: if there is no room for saving the files in the postmaster's space, you can save these messages to the /tmp directory, as in s 120-123 /tmp/mbox.todo, but remember that if the mailhub crashes, everything in /tmp goes away ...

  5. When all large and small messages from the postmaster's mailbox have been saved, quickly remove all messages from the current postmaster's mailbox by exiting the postmaster's mailbox using the x command (to exit without updating) and then using the command:

    cp /dev/null /usr/mmdf/sysmail/postmaster

    from the postmaster command line prompt. There should now be space on the device to process messages. If you had to save the small messages into a file on /tmp, you may want to move the small messages that need processing to the postmaster area by using the command:

    mv /tmp/mbox.todo mbox.todo

    You also want to send an email message to postmaster to put the first "placeholder" message into the mailbox. Use:

    mail postmaster@Virginia.edu

    For subject, use words similar to: Please do not delete.


    For message text, use words similar to: Please do not delete this message.


    Send the message.


    You can process the messages in mbox.todo by using:

    mail -f mbox.todo

    (or mail -f /tmp/mbox.todo if the messages are stored in the /tmp directory)

  6. To process the large messages (if that is needed), we use a utility that truncates the messages at 200 lines and then process the smaller messages appropriately.

    From a command line prompt in the appropriate directory (either the normal postmaster directory or the /tmp directory), use the command tops

    For example,

    mailhub: /home/upostmst $ tops

    The command generates the message:

    mbox.tops: No such file or directory

    and creates the mailbox mbox.tops, where the header and first few lines of each large message is stored as a new message.

  7. Process the messages now in mbox.tops. To open this mailbox, use the command mail -f mbox.tops.

Processing (quick reference):
  1. If needed, open the postmaster's mailbox in read-only mode using
    mail -rf /usr/mmdf/sysmail/postmaster.
  2. Use cksize to determine mailbox size. If over 1 meg, search for messages over 1000 lines.
  3. Save each large message to its own ml mailbox. ml1, ml2, etc. These may be saved in /tmp if needed.
  4. Save each regular message to a mailbox named mbox.todo. These may be saved in /tmp if needed.
  5. Exit the read-only postmaster's mailbox using the command x.
  6. QUICKLY use:
    cp /dev/null /usr/mmdf/sysmail/postmaster
    to eliminate all existing messages in the postmaster's mailbox
  7. Send an email message to postmaster@Virginia.edu to act as the first message place-holder.
  8. Use the command tops to extract the first 200 lines from each large message. The file mbox.tops is created.
  9. Process appropriately the messages in mbox.tops with the command mail -f mbox.tops. Delete processed messages from mbox.tops when done, remove all the ml mailbox by using rm ml*.
  10. Process appropriately the messages in mbox.todo with the command mail -f mbox.todo. Delete processed messages

Intro | Abuse | Aliases | Failed Mail | Help & Contact Info | Jove Hints | Lists |
Massmail | mboxes | Reading the Postmaster's Mailbox | Registration |
Too Large | VI Hints | Viri | Tips and Tricks