How do you configure Postfix to forward received mail to a URL using a POST request?For instance, let Postfix POST the mail to a REST API (i.e. http://example.com/api/mails).The username (and possibly password, though this would already have been checked during authentication) used to authenticate should also be included the POST data in order to distinguish between users.
Postfix; POST email to URL
postfix
Postfix doesn't have REST capabilities built-in, so one will need to write the script in a different language.  You'll have to configure the script as a transport mechanism in your /etc/postfix/master.cf file and configure postfix to use that transport mechanism via transport maps (e.g. transport_maps).I'm not aware of any way the password used for SASL authentication could be forwarded to a script, so you'd have to find an alternative there.