is there a way I can configure postfix (or any other mail solution) to call a url with the status of submission? example message with id 123efd was bounced it will call
https://mailnotifiapi.com/index.php?id=123efd&status=bounce
thank you
is there a way I can configure postfix (or any other mail solution) to call a url with the status of submission? example message with id 123efd was bounced it will call
https://mailnotifiapi.com/index.php?id=123efd&status=bounce
thank you
Your goal is enabling a web interface to access (statistics of) the logs.
There are approaches that don't involve any web calls from the mail server. After all, mail servers don't even handle current logging by themselves but send everything to a logging daemon.
You could write a script that investigates your mail.log
and run it as a cronjob. While this approach doesn't give real-time information, creating a static page would be efficient.
Write your logs to a SQL server. The syslog-ng has sql()
driver and rsyslog has omlibdbi for this purpose. Then simply allow your web interface to access these tables and you can do the statistics in real-time.