man checkerr (Administration système) - check for serious errors encountered by Smail
NAME
checkerr - check for serious errors encountered by Smail
SYNOPSIS
/usr/lib/smail/checkerr [-V]
DESCRIPTION
Checkerr reads through the spool area used by smail(8) and looks for serious processing errors detected by Smail. Whenever new errors are detected, a summary is mailed to ``Postmaster'', which is assumed to be an address for the user who is responsible for maintaining the Smail software and configuration. In addition to this, a number of cleanup operations are performed.
Checkerr should be run periodically from cron(8). Once per day should be sufficient. Make certain that checkerr is executed under a user and group ID that can write to the directories in the Smail spool areas (normally this is only ``root'').
The checkerr detects message spool files under the Smail error directory. If any files have appeared since the last time checkerr was executed, a summary is mailed to the Postmaster. A quick check is made to determine if mail to ``Postmaster'' will actually succeed. If not, the error summary is left in the file .checkerror in the error directory of the spool area.
The error summary will include any logged information pertaining to the failed messages. The per-message log, and related entries from the panic log are both included. If the -V operand is given then entries from the Smail transaction log will also be included.
Before summarizing any new double-bounce messages left in the frozen error queue since the last run, checkerr will look for extended regular expressions (EREs) listed in the file /etc/smail/dead-mail.egrep (using egrep(1)) and remove any matching message queue files. Unique new sender addresses from any removed messages will be added to the file .dead_bounce_senders in the spool area.
Here are some examples of such ERE patterns. The first matches messages which an anti-virus filter mangled before they arrived on the local system and which could not be delivered locally and now cannot be returned to their sender either. The second matches a very common e-mail worm. The last one matches the first line of a MIME body in another very common e-mail virus.
The file was successfully deleted by RAV AntiVirus I send you this file in order to have your advice ^TVqQ[a-zA-Z]+
The list of message-IDs corresponding to messages matching the EREs in dead-mail.egrep and which were removed from the frozen error queue will remain in .dead_bounces in the tmp subdirectory of the spool area until the next time checkerr is run so that corresponding log entries can be examined if desired.
NOTE: if you add new ERE patterns to the dead-mail.egrep list you will have to manually search for old frozen error messages since checkerr only looks at messages frozen since it was last run. You can do this, and remove the message queue files you find, with a command such as:
cd /var/mail; find . -name '[0-9]*' -print | \ xargs egrep -l -f /etc/smail/dead-mail.egrep | \ xargs rm
Also before summarizing any messages frozen since its last run checkerr will call unfreezemail(8) to attempt re-delivery of any bounce messages which were frozen because there was a local EX_TEMPFAIL error (e.g. because the local delivery transport encountered an over-quota target mailbox). A list of the locally destined but still un-deliverable bounce messages will remain in a file called .tempfail_bounces in the spool area until the next time checkerr is run so that corresponding log entries can be examined if desired.
FILES
- /etc/smail/config
- The main Smail configuration file. The runtime configuration specifies the actual location of the log files and spool directories.
- /etc/smail/dead_mail.egrep
- A list of extended regular expressions which if found using egrep(1) in any message in the error queue(s) will cause the message to be uncerimoniously deleted. Take great care creating these entries!
- /usr/sbin/smail
- The default executable used for attempting to deliver error summaries to the postmaster.
- /var/log/smail/logfile
- The default name for the transaction log file. This can be changed in the Smail config file.
- /var/log/smail/logfile.0
- Archived version of the transaction log file. The directory "/var/log/smail" is changed to be under the directory where the logfile resides, and thus can be changed in the Smail config file.
- /var/log/smail/logfile.1.gz
- Previous compressed archive version of the transaction log file. The directory /var/log/smail is always reset to be within the directory where the log file currently resides, and thus can be changed in the Smail config file.
- /var/log/smail/paniclog
- The default name for the panic log file. This can be changed in the Smail config file.
- /var/log/smail/paniclog.0
- Archive for the panic log file. This can be changed in the Smail config file.
- /var/log/smail/paniclog.1.gz
- Previous compressed archive for the panic log file. This can be changed in the Smail config file.
- /var/mail
- top of the default Smail spool directory tree. } Delivery is attempted at intervals from each of these trees. In addition, errors in spooling new messages to trees earlier in the list will result in attempts to spool to trees later in the list.
The directories listed below are an example of the contents under each of these trees: }
- /var/mail/input
- The directory into which incoming messages are spooled. Each file in this directory has a unique 14 character name derived from the message ID used internally by the smail program. Delivery is attempted at intervals for each of these files.
- /var/mail/lock
- A directory containing lock files. On systems which do not have an efficient file locking primative, files are created under this directory to prevent simultaneous processing of messages by concurrant invocations of the smail program.
- /var/mail/msglog
- A directory containing per-message transaction logs. Smail maintains these logfiles to keep track of which recipients have received a particular mail message, and what errors have so far been found while delivering. These files are removed automatically by smail processing of a message has completed.
- /var/mail/error
- This is the frozen error queue. If a mail messages fails for a reason that requires attendance by the site administrator, it is moved into this directory to prevent Smail from continuing to attempt delivery. Examples of such failures are double bounces - i.e. bounces which could not be returned to their sender address for some reason.
- /var/mail/tmp
- The default name for the temporary directory.
SEE ALSO
COPYRIGHT
Copyright
(C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
Copyright
(C) 1992 Ronald S. Karr
See a file COPYING, distributed with the source code, or type smail -bc, to view distribution rights and restrictions associated with this software.