W=
Timeout for a process wait V8.10 and later
When sendmail delivers a message via a local program (such as mail.local, procmail, uux, and the like), sendmail will fork(2) and the child will execute the program. Delivery is usually a pipe connection between sendmail and the program.
Usually programs complete their jobs promptly, and exit. The exit(2) code produced by the program tells sendmail whether the program succeeded. Because the program must exit before sendmail can consider the delivery a success, sendmail must wait(2) for the program to exit.
Some programs, in some circumstances, will delay for an excessively long time before exiting. Consider, for example, the procmail delivery agent. If it is configured to allow delivery over NFS, and the NFS server goes down, the procmail delivery agent can hang for a very long time.
Whenever there is risk that a delivery agent might
hang because of system problems, you would be wise
to either eliminate that dependency or add this
W=
delivery
agent equate to its definition. To add W=
to
procmail, for example, you
can do the following in your
.mc configuration
file:
define(`PROCMAIL_MAILER_PATH', `/usr/local/bin/procmail, W=2m')
The argument following W=
(the 2m
) is a time expression as described
in Periodically with -q on page
427. Here, the 2m
means two minutes.
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.