${queue_interval}

The interval specified by -q V8.10 and later

When sendmail first starts, the -q command-line switch (Periodically with -q on page 427) tells it how often to process its queues. The form of that command-line switch looks like this:

-qinterval

The interval is an expression composed of numbers and letters that sets the time interval between queue processing runs. The following, for example, sets the interval to be once every 2 hours, 13 minutes, 7 seconds:

-q2h13m7s

In typical installations, the interval is usually expressed only in minutes:

-q15m

When sendmail first starts, it finds the -q command-line switch, then places the interval value into the ${queue_interval} macro. That value is a text expression containing three positions:

hours:minutes:seconds

If the interval is longer than a day, that number of days (and possibly weeks or months) is expressed in hours in the hours position. If any of the three positions is zero, it is expressed as 00. If any of the three positions has a value less than 10, it is zero-padded on the left. For example, a -q0h9m12s would yield this value in the ${queue_interval} macro:

00:09:12

One possible use for this macro might be to cause rules to function differently depending on whether the -q command-line switch contains an interval. Consider, for example, the following mc configuration file lines:

LOCAL_RULESETS
Squeuegroup
R $*                        $: $&{queue_interval} $| $1
R $+ : $+ : $+ $| $*        $@
... select queue groups here

Here, under LOCAL_RULESETS, we declare ...

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.