/*++ /* NAME /* bounce_log 3 /* SUMMARY /* bounce file API /* SYNOPSIS /* #include <bounce_log.h> /* /* typedef struct { /* .in +4
/* /* No public members. */ /* .in -4 /* } BOUNCE_LOG; /* /* BOUNCE_LOG *bounce_log_open(queue, id, flags, mode) /* const char *queue; /* const char *id; /* int flags; /* mode_t mode; /* /* BOUNCE_LOG *bounce_log_read(bp, rcpt, dsn) /* BOUNCE_LOG *bp; /* RCPT_BUF *rcpt; /* DSN_BUF *dsn; /* /* void bounce_log_rewind(bp) /* BOUNCE_LOG *bp; /* /* void bounce_log_close(bp) /* BOUNCE_LOG *bp; /* DESCRIPTION /* This module implements a bounce/defer logfile API. Information /* is sanitized for control and non-ASCII characters. Fields not /* present in input are represented by empty strings. /* /* bounce_log_open() opens the named bounce or defer logfile /* and returns a handle that must be used for further access. /* The result is a null pointer if the file cannot be opened. /* The caller is expected to inspect the errno code and deal /* with the problem. /* /* bounce_log_read() reads the next record from the bounce or defer /* logfile (skipping over and warning about malformed data) /* and breaks out the recipient address, the recipient status /* and the text that explains why the recipient was undeliverable. /* bounce_log_read() returns a null pointer when no recipient was read, /* otherwise it returns its argument. /* /* bounce_log_rewind() is a helper that seeks to the first recipient /* in an open bounce or defer logfile (skipping over recipients that /* are marked as done). The result is 0 in case of success, -1 in case /* of problems. /* /* bounce_log_close() closes an open bounce or defer logfile and /* releases memory for the specified handle. The result is non-zero /* in case of I/O errors. /* /* Arguments: /* .IP queue /* The bounce or defer queue name. /* .IP id /* The message queue id of bounce or defer logfile. This /* file has the same name as the original message file. /* .IP flags /* File open flags, as with open(2). /* .IP mode /* File permissions, as with open(2). /* .IP rcpt /* Recipient buffer. The RECIPIENT member is updated. /* .IP dsn /* Delivery status information. The DSN member is updated. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
if (BUF_NODATA(rcpt_buf->address))
BUF_ASSIGN(rcpt_buf->address, "(recipient address unavailable)"); if (BUF_NODATA(dsn_buf->status))
BUF_ASSIGN(dsn_buf->status, bp->compat_status); if (BUF_NODATA(dsn_buf->action))
BUF_ASSIGN(dsn_buf->action, bp->compat_action); if (BUF_NODATA(dsn_buf->reason))
BUF_ASSIGN(dsn_buf->reason, "(description unavailable)");
(void) RECIPIENT_FROM_RCPT_BUF(rcpt_buf);
(void) DSN_FROM_DSN_BUF(dsn_buf); return (bp);
}
/* bounce_log_close - close bounce reader stream */
int bounce_log_close(BOUNCE_LOG *bp)
{ int ret;
ret = vstream_fclose(bp->fp);
vstring_free(bp->buf);
myfree(bp->compat_status);
myfree(bp->compat_action);
myfree((void *) bp);
return (ret);
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.21Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.