7 /* flush backed up mail
9 /* #include <mail_flush.h>
11 /* int mail_flush_deferred()
13 /* int mail_flush_maildrop()
15 /* This module triggers delivery of backed up mail.
17 /* mail_flush_deferred() triggers delivery of all deferred
18 /* or incoming mail. This function tickles the queue manager.
20 /* mail_flush_maildrop() triggers delivery of all mail in
21 /* the maildrop directory. This function tickles the pickup
24 /* The result is 0 in case of success, -1 in case of failure.
28 /* The Secure Mailer license must be distributed with this software.
31 /* IBM T.J. Watson Research
33 /* Yorktown Heights, NY 10598, USA
40 /* Utility library. */
44 #include <mail_params.h>
45 #include <mail_proto.h>
46 #include <mail_flush.h>
48 /* mail_flush_deferred - flush deferred/incoming queue */
50 int mail_flush_deferred(void)
52 static char qmgr_trigger
[] = {
53 QMGR_REQ_FLUSH_DEAD
, /* all hosts, all transports */
54 QMGR_REQ_SCAN_ALL
, /* all time stamps */
55 QMGR_REQ_SCAN_DEFERRED
, /* scan deferred queue */
56 QMGR_REQ_SCAN_INCOMING
, /* scan incoming queue */
60 * Trigger the flush queue service.
62 return (mail_trigger(MAIL_CLASS_PUBLIC
, var_queue_service
,
63 qmgr_trigger
, sizeof(qmgr_trigger
)));
66 /* mail_flush_maildrop - flush maildrop queue */
68 int mail_flush_maildrop(void)
70 static char wakeup
[] = {TRIGGER_REQ_WAKEUP
};
73 * Trigger the pickup service.
75 return (mail_trigger(MAIL_CLASS_PUBLIC
, var_pickup_service
,
76 wakeup
, sizeof(wakeup
)));