/*++ /* NAME /* smtpd_sasl_proto 3 /* SUMMARY /* Postfix SMTP protocol support for SASL authentication /* SYNOPSIS /* #include "smtpd.h" /* #include "smtpd_sasl_proto.h" /* /* int smtpd_sasl_auth_cmd(state, argc, argv) /* SMTPD_STATE *state; /* int argc; /* SMTPD_TOKEN *argv; /* /* void smtpd_sasl_auth_extern(state, username, method) /* SMTPD_STATE *state; /* const char *username; /* const char *method; /* /* void smtpd_sasl_auth_reset(state) /* SMTPD_STATE *state; /* /* char *smtpd_sasl_mail_opt(state, sender) /* SMTPD_STATE *state; /* const char *sender; /* /* void smtpd_sasl_mail_reset(state) /* SMTPD_STATE *state; /* /* static int permit_sasl_auth(state, authenticated, unauthenticated) /* SMTPD_STATE *state; /* int authenticated; /* int unauthenticated; /* DESCRIPTION /* This module contains random chunks of code that implement /* the SMTP protocol interface for SASL negotiation. The goal /* is to reduce clutter of the main SMTP server source code. /* /* smtpd_sasl_auth_cmd() implements the AUTH command and updates /* the following state structure members: /* .IP sasl_method /* The authentication method that was successfully applied. /* This member is a null pointer in the absence of successful /* authentication. /* .IP sasl_username /* The username that was successfully authenticated. /* This member is a null pointer in the absence of successful /* authentication. /* .PP /* smtpd_sasl_auth_reset() cleans up after the AUTH command. /* This is required before smtpd_sasl_auth_cmd() can be used again. /* This may be called even if SASL authentication is turned off /* in main.cf. /* /* smtpd_sasl_auth_extern() records authentication information /* that is received from an external source. /* This may be called even if SASL authentication is turned off /* in main.cf. /* /* smtpd_sasl_mail_opt() implements the SASL-specific AUTH=sender /* option to the MAIL FROM command. The result is an error response /* in case of problems. /* /* smtpd_sasl_mail_reset() performs cleanup for the SASL-specific /* AUTH=sender option to the MAIL FROM command. /* /* permit_sasl_auth() permits access from an authenticated client. /* This test fails for clients that use anonymous authentication. /* /* Arguments: /* .IP state /* SMTP session context. /* .IP argc /* Number of command line tokens. /* .IP argv /* The command line parsed into tokens. /* .IP sender /* Sender address from the AUTH=sender option in the MAIL FROM /* command. /* .IP authenticated /* Result for authenticated client. /* .IP unauthenticated /* Result for unauthenticated client. /* DIAGNOSTICS /* All errors are fatal. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Initial implementation by: /* Till Franke /* SuSE Rhein/Main AG /* 65760 Eschborn, Germany /* /* Adopted by: /* 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 /* /* TLS support originally by: /* Lutz Jaenicke /* BTU Cottbus /* Allgemeine Elektrotechnik /* Universitaetsplatz 3-4 /* D-03044 Cottbus, Germany
/*--*/
/* permit_sasl_auth - OK for authenticated connection */
int permit_sasl_auth(SMTPD_STATE *state, int ifyes, int ifnot)
{ if (state->sasl_method && strcasecmp(state->sasl_method, "anonymous")) return (ifyes); return (ifnot);
}
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 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.