7 /* log that a message was opened
11 /* void opened(queue_id, sender, size, nrcpt, format, ...)
12 /* const char *queue_id;
13 /* const char *sender;
16 /* const char *format;
18 /* opened() logs that a message was successfully delivered.
20 /* vopened() implements an alternative interface.
28 /* Message content size.
30 /* Number of recipients.
32 /* Format of optional text.
34 /* Fatal: out of memory.
36 /* Should be replaced by routines with an attribute-value based
37 /* interface instead of an interface that uses a rigid argument list.
41 /* The Secure Mailer license must be distributed with this software.
44 /* IBM T.J. Watson Research
46 /* Yorktown Heights, NY 10598, USA
52 #include <stdlib.h> /* 44BSD stdarg.h uses abort() */
55 /* Utility library. */
64 /* opened - log that a message was opened */
66 void opened(const char *queue_id
, const char *sender
, long size
, int nrcpt
,
72 vopened(queue_id
, sender
, size
, nrcpt
, fmt
, ap
);
76 /* vopened - log that a message was opened */
78 void vopened(const char *queue_id
, const char *sender
, long size
, int nrcpt
,
79 const char *fmt
, va_list ap
)
81 VSTRING
*text
= vstring_alloc(100);
83 #define TEXT (vstring_str(text))
85 vstring_vsprintf(text
, fmt
, ap
);
86 msg_info("%s: from=<%s>, size=%ld, nrcpt=%d%s%s%s",
87 queue_id
, sender
, size
, nrcpt
,
88 *TEXT
? " (" : "", TEXT
, *TEXT
? ")" : "");