Knowledge base

API and proxies

entries in this theme: 52
client<proxy>criticalDirectiveThe sending address the proxy must use; together with server, these are the block’s two required lines.enable-source-ip-limits-on-sending-ip<domain>criticalDirectiveImportant when sending through a proxy: the local address and the one the receiver sees are different.server<proxy>criticalDirectiveWhere the node connects instead of the receiving server; together with client, these are the block’s two required lines.smtp-proxy-source-hostGlobalcriticalDirectiveThe vendor’s way to send through a proxy — local address, proxy, client address and greeting name in one line.http-enable-api-configGlobalDirectiveOpens an interface that allows creating address lists and sending addresses over HTTP; off by default.http-webhook-url<acct-file>set by the HubDirectiveAn endpoint that receives accounting records over HTTP; the path in the block tag stays and serves as intermediate storage.include-tlv<proxy>DirectiveAdds a field with the queue domain to the PROXY header; works only with the second protocol version.protocol-version<proxy>DirectiveThe HAProxy header version, 1 or 2; if not set, it is taken from the sending address, then from the node.proxy-include-tlvGlobalDirectiveAdds a field with the queue domain to the PROXY header; requires the second protocol version.retry-attempts<proxy>DirectiveThe number of connection attempts to the proxy before moving on to the next one in the list; the default is one, the ceiling is ten.use-inbound-proxy<smtp-listener>DirectiveRequires a PROXY header at the start of the connection and takes the real client address from it; off by default.use-proxyGlobalDirectiveA list of proxy blocks in backup order; the second is used only when the first did not respond.http-delivery-url<domain>DirectiveMandatory for an http-delivery queue; an absolute address without credentials or a query string.http-webhook-extra-headers<acct-file>set by the HubDirectiveA path to a file whose every line is an HTTP header added to the request carrying a batch of records.http-webhook-max-connections<acct-file>DirectiveThe number of threads sending accounting records to the endpoint; the default is one, the ceiling fifty.http-webhook-max-interval<acct-file>set by the HubDirectiveThe interval for collecting records into a batch before sending; the minimum is one minute, the default five.inbound-proxy-timeout<smtp-listener>DirectiveThe limit for waiting for the PROXY header at the start of a connection; the default is five seconds, and zero means “wait forever.”proxy-protocolGlobalDirectiveThe HAProxy header version, 1 or 2; the default is the first.use-inbound-proxy<transmissions-api-listener>DirectiveRequires a PROXY header at the start of the connection and takes the real client address from it; off by default.http-delivery-extra-headers<domain>DirectiveThe only place to put authorization: credentials in the address itself are forbidden.http-webhook-ca-file<acct-file>DirectivePath to a PEM file with authority certificates by which the node verifies the endpoint’s certificate.http-webhook-certificate<acct-file>DirectiveA PEM file with the certificate the node presents to the endpoint if the endpoint requests it.http-webhook-connect-timeout<acct-file>DirectiveThe wait limit when connecting to the webhook endpoint; the default is five seconds.http-webhook-io-timeout<acct-file>DirectiveThe wait limit for any exchange operation with the endpoint after the connection is established; the default is five seconds.http-webhook-log-verbose<acct-file>DirectiveAdds messages about sending batches to the engine log, not only about errors; off by default.http-webhook-transfer-encoding<acct-file>DirectiveThe only supported value is gzip; by default the content goes out uncompressed.inbound-proxy-timeout<transmissions-api-listener>DirectiveThe limit for waiting for the PROXY header at the start of a connection; the default is five seconds, and zero means “wait forever.”log-inbound-proxy<transmissions-api-listener>DirectiveWrites the received PROXY header to the log; works only with reception of such a header enabled.add-x-msys-api-header<domain>DirectiveAdds the service header that sets SparkPost options and carries the job label into it as the campaign name; a header already in place is left untouched.add-x-msys-api-header-metadata<domain>DirectiveCarries the content of the named headers into the service header; does not work without the parent line, with the header already in place, or for headers the node adds itself.customer-id<signals>DirectiveBefore version 5.5 it was required for engine-side tracking; since 5.5 it is not needed.sparkpost-ip-pool<domain>DirectiveNames an address pool on the service’s side; the addresses themselves are not yours, and their reputation is shared with the service’s other customers.sparkpost-sandbox<domain>DirectivePasses the sandbox option to SparkPost: the message goes out from a SparkPost test domain without your own sending domain, and according to the SparkPost documentation an account gets no more than five such messages.upload-url<signals>DirectiveThe event intake endpoint; by default the vendor service’s address.A named proxy and three levels of its settingscriticalMechanismThe block carries the proxy address, the external sending address, the protocol version, the field type and the number of attempts; the first two lines are required.External addresses on one machine, nodes insidecriticalMechanismNodes sit on internal addresses and go out through a proxy that holds all the external sending addresses.Monitor response formatsMechanismThe web monitor serves pages to a person at the address with /ui, and XML or JSON to a program at the same address without the suffix.How the API reports an errorMechanismHTTP submission reports errors with response codes, while the configuration API answers 200 to everything except an access refusal and puts the outcome in the status field.Command output formatsMechanismNode commands can print not only text but structure too.How a binding reports an errorMechanismThe C++ binding reports an error with an exception, after which the object is discarded; the C binding with a returned flag and a separate query for the last error.Object lifetime in the C bindingMechanismIn the C binding every object is allocated, initialized and freed explicitly — where in C++ a constructor and destructor do this.<proxy>Configuration blockA named block with the proxy address and the external sending address; both lines are mandatory, and there can be several blocks.<transmissions-api-listener>Configuration blockThe address, port and encryption for submitting messages over HTTP.<transmissions-api>Configuration blockAccess keys, the request size limit and logging for submitting mail over HTTPS; declared once at the root of the file.show registrationCommandPrints whether the node is registered in the vendor’s console.deregisterCommandEnds the relationship with the vendor’s console.registerCommandEstablishes a relationship between the node and the vendor’s management console.Run a command over the networkcriticalAPI endpointRuns a node console command passed in the request and returns the result as a structure or as text.Return a node filecriticalAPI endpointReturns a log or accounting file by name from the /logs list.The whole node state in one documentcriticalAPI endpointReturns the status page as a structure in XML or JSON: product, license, machine, traffic, connections, resolver, queues, spool and the running flag — in one response.List of logs and accounting filesAPI endpointLists the log and accounting files the monitor can serve; the contents themselves come through /getFile.Web monitor rootAPI endpointReturns the monitor’s start page as a structure: installation information and the top queue domains.