On Mon, Jul 01, 2019 at 04:56:29PM +0000, Patton, Matthew [Contractor] wrote:
> In effect I need to do; For each message in delivery queue, construct JSON > payload and use Curl to post to API endpoint, mark message as forwarded. > Next. Send it via LMTP to a proxy process that is listening on a unix-domain socket. The proxy needs a bare-bones LMTP implementation, and some code to re-post the message via HTTP and reinterpret HTTP success/fail responses as LMTP responses. The LMTP proxy is the cleanest way to do this, but will require writing an LMTP server. If you want to just assemble existing code, then fork/exec curl could work, but getting reliable success/fail/temp-fail out of curl is tricky. -- Viktor.