Adjusting the Frequency of the Return Old Messages Program

The IMTA runs a second periodic job called return.sh which has as its primary job the returning of old, undeliverable messages which have sat around in the message queues for too long. return.sh is a shell script at
/opt/SUNWmail/imta/lib/return.sh. The cron daemon normally schedules it to run once a day at 30 minutes after midnight.

The return.sh scans the channels listed in the configuration file, checking the values established with the notices keyword. The messages queued to each channel are then checked. A warning message is sent for every message whose age in days matches any of the values specified with the notices keyword on the associated channel. The default ages if no notices keyword is specified are 3, 6, 9, and 12 days. If the message is as old or older than the final notices value, the entire message is returned and the original message is deleted from the channel queue; no further attempts to deliver the message will be made. (See the SIMS Reference Manual for notices channel keyword.)

The text of the warning and failure notices issued by the message return system is contained in the pair of files return_warning.txt and return_failure.txt located in /opt/SUNWmail/imta/locale/{C}/LC.MESSAGES directory. These files can be edited to provide different notification text if desired.

IMTA maintains a history of delivery attempts for each message, which sometimes will include information about why the delivery attempts failed. This information is included in returned messages if RETURN_DELIVERY_HISTORY is set to 1 in the IMTA Option file (this is the default). A value of 0 disables the inclusion of this information.

imta_tailor file options can be used to control the periodicity of the various subfunctions of the message return system. The IMTA_RETURN_SYNCH_PERIOD option in /opt/SUNWmail/imta/imta_tailor controls queue synchronization, the IMTA_RETURN_PERIOD IMTA tailor file option controls the return of expired messages and the generation of warnings, and the IMTA_RETURN_SPLIT_PERIOD IMTA tailor file option controls splitting of the mail.log file. If any of these options is set to an integer value N, then the action associated with the tailor file option will only be performed every N times the message return job runs. The value of these options is taken to be 1 if the option is not specified in the IMTA tailor file.

If the IMTA return job is running once an hour, then the default will be to issue warning notices for messages which have remained undeliverable for 3, 6, or 9 hours. Message which have remained undeliverable for 12 or more hours are returned in their entirety to their sender and no further delivery attempts are made.


Note - When RETURN_UNITS=1, these defaults will result in mail being bounced much too soon; therefore, sites are strongly encouraged to use the notices channel keyword to set "bounce" ages in excess of twelve hours.

return.sh also performs various IMTA periodic cleanup tasks tuned on the assumption that the return job will only be running once a day. When return.sh is run more frequently, various IMTA parameters should be adjusted accordingly. In particular, the IMTA_RETURN_SYNCH_PERIOD and IMTA_RETURN_SPLIT_PERIOD IMTA tailor file options should generally be adjusted so that these tasks are still performed only once a day. See the imta purge and imta cache-sync utilities in the SIMS Reference Guide for details o nthe cleanup programs used.




Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.