While you're setting up mhook programs, as you're changing the setup later, or any time you aren't sure that things are working right, it's a good idea to make backup copies of all your incoming mail. Periodically, check your backup mail to be sure you've gotten all the messages you should. Then remove the backup.
If you have access to a second account, forward a copy of all your mail to it. My main account is jerry, but I also have a jerrytst account. My system runs sendmail, so I make a .forward file like this on my jerry account:
jerrytst, "| /x/y/slocal -user jerry"If you don't have a second account, you can use a .forward file that makes a copy in a file somewhere on your account. The file may need to be world-writable (mode 666 or 622), though, and that can be a security hole. The following .forward file copies all incoming mail to a file named mail.bak in my home directory:
/home/jerry/mail.bak, "| /x/y/slocal -user jerry"A third choice: have sendmail drop a copy of the message into your system mailbox before (or after) it runs slocal. It's simple to set up but it's also a little messy because your mailbox may get two copies of a lot of messages. Put a backslash before your username to prevent reforwarding of the copy:
\jerry, "| /x/y/slocal -user jerry"An easy way to clean out your backup mail file is by copying the system "empty file" onto it. For example, on the jerrytst account, I type:
% scan -file /usr/spool/mail/jerrytst ...Check scan listing of my backup mail... % cp /dev/null /usr/spool/mail/jerrytstAre you sure that slocal is working but uncomfortable that your .maildelivery file may be losing messages? If you aren't sure, add an entry to file a copy of all messages into a folder:
* - ^ R "/x/y/rcvstore +DELETE"scan through your DELETE folder whenever you're looking for missing mail. Remember to clean it out with rmm or an automated script (see the Section Periodic Cleanup, Checking, etc. with cron and at for an introduction and examples).
[Table of Contents] [Index] [Previous: Running Your .maildelivery File] [Next: New Message Notification: rcvtty]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <jerry@ora.com>
HIVE: All information for read only. Please respect copyright! |