/*++ /* NAME /* smtpd_haproxy 3 /* SUMMARY /* Postfix SMTP server haproxy adapter /* SYNOPSIS /* #include "smtpd.h" /* /* int smtpd_peer_from_haproxy(state) /* SMTPD_STATE *state; /* DESCRIPTION /* smtpd_peer_from_haproxy() receives endpoint address and /* port information via the haproxy protocol. /* /* The following summarizes what the Postfix SMTP server expects /* from an up-stream proxy adapter. /* /* .IP /* Return -1 in case of error, zero otherwise. In case of error, /* the caller will clean up any incomplete endpoint info. /* .IP \(bu /* Call smtpd_peer_from_default() if the up-stream proxy /* indicates that the connection is not proxied. In that case, /* a proxy adapter MUST NOT update dynamically-allocated STATE /* text fields: the smtpd_peer_from_default() function will do /* that instead. /* .IP \(bu /* Validate protocol, address and port syntax. Permit only /* protocols that are configured with the main.cf:inet_protocols /* setting. /* .IP \(bu /* Convert IPv4-in-IPv6 address syntax to IPv4 syntax when /* both IPv6 and IPv4 support are enabled with main.cf:inet_protocols. /* .IP \(bu /* Update the following STATE fields: addr, port, rfc_addr, /* addr_family, dest_addr, dest_port. The addr_family field applies /* to the client address. /* .IP \(bu /* Either update the STATE binary fields sockaddr and dest_sockaddr, /* or call smtpd_peer_hostaddr_to_sockaddr() after updating the /* STATE text fields addr, port, dest_addr, and dest_port. /* .IP \(bu /* Dynamically allocate storage for string information with /* mystrdup(). In case of error, leave unassigned string fields /* at their initial zero value. The caller will clean up. /* .IP \(bu /* Log a clear warning message that explains why a request /* fails. /* .IP \(bu /* Never talk to the remote SMTP client. /* .PP /* Arguments: /* .IP state /* Session context. /* DIAGNOSTICS /* Warnings: I/O errors, malformed haproxy line. /* /* The result value is 0 in case of success, -1 in case of /* error. /* 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 /* /* Wietse Venema /* porcupine.org
/*--*/
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.