Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  reject_deliver_request.c

  Sprache: C
 

/*++
/* NAME
/* reject_deliver_request 3
/* SUMMARY
/* reject an entire delivery request
/* SYNOPSIS
/* #include <reject_deliver_request.h>
/*
/* int     reject_deliver_request(
/* const char *service,
/* DELIVER_REQUEST *request,
/* const char *code,
/* const char *format, ...);
/* DESCRIPTION
/* reject_deliver_request() rejects an entire delivery request
/* and bounces or defers all its recipients. The result value
/* is the request's delivery status.
/*
/* Arguments:
/* .IP service
/* The service name from master.cf.
/* .IP request
/* The delivery request that is being rejected.
/* .IP code
/* Enhanced status code, must be in 4.X.X or 5.X.X. form.
/* All recipients in the request are bounced or deferred
/* depending on the status code value.
/* .IP "format, ..."
/* Format string and optional arguments.
/* DIAGNOSTICS
/* Panic: interface violation. Fatal: out of memory.
/* LICENSE
/* .ad
/* .fi
/* The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/* Wietse Venema
/* Google, Inc.
/* 111 8th Avenue
/* New York, NY 10011, USA
/*
/* Wietse Venema
/* porcupine.org
/*--*/


 /*
  * System library.
  */

#include <sys_defs.h>
#include <string.h>

 /*
  * Utility library.
  */

#include <msg.h>

 /*
  * Global library.
  */

#include <bounce.h>
#include <defer.h>
#include <deliver_completed.h>
#include <deliver_request.h>
#include <recipient_list.h>

/* reject_deliver_request - reject an entire delivery request */

int     reject_deliver_request(const char *service, DELIVER_REQUEST *request,
                  const char *code,
                  const char *format,...)
{
    const char myname[] = "reject_deliver_request";
    va_list ap;
    RECIPIENT *rcpt;
    DSN_BUF *why;
    int     status;
    int     result = 0;
    int     n;

    /*
     * Format something that we can pass to bounce_append() or
     * defer_append().
     */

    va_start(ap, format);
    why = vdsb_simple(dsb_create(), code, format, ap);
    va_end(ap);
    (void) DSN_FROM_DSN_BUF(why);
    if (strchr("45", vstring_str(why->status)[0]) == 0)
 msg_panic("%s: bad enhanced status code %s", myname, code);

    /*
     * Blindly bounce or defer all recipients.
     */

    for (n = 0; n < request->rcpt_list.len; n++) {
 rcpt = request->rcpt_list.info + n;
 status = (vstring_str(why->status)[0] != '4' ?
    bounce_append : defer_append)
     (DEL_REQ_TRACE_FLAGS(request->flags),
      request->queue_id,
      &request->msg_stats, rcpt,
      service, NO_TLS_STATS, &why->dsn);
 if (status == 0)
     deliver_completed(request->fp, rcpt->offset);
 result |= status;
    }
    dsb_free(why);
    return (result);
}

Messung V0.5 in Prozent
C=87 H=98 G=92

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002